netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Matteo Croce <mcroce@redhat.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2] ip link: don't stop batch processing
Date: Wed, 8 Aug 2018 09:27:05 -0700	[thread overview]
Message-ID: <20180808092705.0b2d8e7d@xeon-e3> (raw)
In-Reply-To: <20180803174933.24600-1-mcroce@redhat.com>

On Fri,  3 Aug 2018 19:49:33 +0200
Matteo Croce <mcroce@redhat.com> wrote:

> When 'ip link show dev DEVICE' is processed in a batch mode, ip exits
> and stop processing further commands.
> This because ipaddr_list_flush_or_save() calls exit() to avoid printing
> the link information twice.
> Replace the exit with a classic goto out instruction.
> 
> Signed-off-by: Matteo Croce <mcroce@redhat.com>
> ---
>  ip/ipaddress.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ip/ipaddress.c b/ip/ipaddress.c
> index 6c306ab7..b7b78f6e 100644
> --- a/ip/ipaddress.c
> +++ b/ip/ipaddress.c
> @@ -1920,7 +1920,7 @@ static int ipaddr_list_flush_or_save(int argc, char **argv, int action)
>  			exit(1);
>  		}
>  		delete_json_obj();
> -		exit(0);
> +		goto out;
>  	}
>  
>  	if (filter.family != AF_PACKET) {

Applied

      parent reply	other threads:[~2018-08-08 18:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03 17:49 [PATCH iproute2] ip link: don't stop batch processing Matteo Croce
2018-08-03 18:08 ` Dave Taht
2018-08-08 16:26   ` Stephen Hemminger
2018-08-08 16:27 ` Stephen Hemminger [this message]

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=20180808092705.0b2d8e7d@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=mcroce@redhat.com \
    --cc=netdev@vger.kernel.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).