[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <554A4D31.1080809@cumulusnetworks.com>
Date: Wed, 06 May 2015 10:19:45 -0700
From: roopa <roopa@...ulusnetworks.com>
To: Stephen Hemminger <stephen@...workplumber.org>
CC: netdev@...r.kernel.org, Stephen Hemminger <shemming@...cade.com>
Subject: Re: [PATCH 2/4] ip: return correct exit code on route failure
On 5/6/15, 9:58 AM, Stephen Hemminger wrote:
> From: Stephen Hemminger <shemming@...cade.com>
>
> If kernel complains about ip route request, exit status should be
> 2 not 1.
>
> This fixes regression introduced by:
> commit 42ecedd4bae534fc688194a795eb4548c6530cda
> Author: Roopa Prabhu <roopa@...ulusnetworks.com>
> Date: Tue Mar 17 19:26:32 2015 -0700
>
> fix ip -force -batch to continue on errors
> ---
> ip/iproute.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ip/iproute.c b/ip/iproute.c
> index e0a6159..06aea6f 100644
> --- a/ip/iproute.c
> +++ b/ip/iproute.c
> @@ -1164,7 +1164,7 @@ static int iproute_modify(int cmd, unsigned flags, int argc, char **argv)
> req.r.rtm_family = AF_INET;
>
> if (rtnl_talk(&rth, &req.n, 0, 0, NULL) < 0)
> - return -1;
> + return -2;
>
> return 0;
> }
Acked-by: Roopa Prabhu <roopa@...ulusnetworks.com>
Thanks for documenting the error code convention.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists