[CRIU] [PATCH 1/5] netlink: Don't signify error code

Pavel Emelyanov xemul at parallels.com
Tue Mar 26 11:19:19 EDT 2013


On 03/26/2013 01:26 AM, Cyrill Gorcunov wrote:
> netlink layer reports negative error code
> so no need to signify it.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  libnetlink.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libnetlink.c b/libnetlink.c
> index e852aaa..4e4e02b 100644
> --- a/libnetlink.c
> +++ b/libnetlink.c
> @@ -50,7 +50,7 @@ static int nlmsg_receive(char *buf, int len, int (*cb)(struct nlmsghdr *, void *
>  			if (err->error == 0)
>  				return 0;
>  
> -			pr_err("ERROR %d reported by netlink\n", -err->error);
> +			pr_err("ERROR %d reported by netlink\n", err->error);

It's signified to get positive error code in message.

>  			return -1;
>  		}
>  		if (cb(hdr, arg))
> 




More information about the CRIU mailing list