From: Vadim Kochan <vadim4j@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, Stephen Hemminger <shemming@brocade.com>
Subject: Re: [PATCH 2/4] ip: return correct exit code on route failure
Date: Wed, 6 May 2015 20:25:02 +0300 [thread overview]
Message-ID: <20150506172502.GA2560@angus-think.lan> (raw)
In-Reply-To: <1430931483-28595-3-git-send-email-stephen@networkplumber.org>
On Wed, May 06, 2015 at 09:58:01AM -0700, Stephen Hemminger wrote:
> From: Stephen Hemminger <shemming@brocade.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@cumulusnetworks.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;
May be it would be good to have a #define's like ERR_APP & ERR_KERN ?
>
> return 0;
> }
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-05-06 17:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 16:57 [PATCH 0/4] iproute2: exit code fixes Stephen Hemminger
2015-05-06 16:58 ` [PATCH 1/4] ip: document exit code Stephen Hemminger
2015-05-06 17:16 ` Vadim Kochan
2015-05-06 16:58 ` [PATCH 2/4] ip: return correct exit code on route failure Stephen Hemminger
2015-05-06 17:19 ` roopa
2015-05-06 17:25 ` Vadim Kochan [this message]
2015-05-06 16:58 ` [PATCH 3/4] ip: fix exit code for rule failures Stephen Hemminger
2015-05-06 16:58 ` [PATCH 4/4] ip: fix exit code for addrlabel Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150506172502.GA2560@angus-think.lan \
--to=vadim4j@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shemming@brocade.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).