From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH iproute2] ip link: don't stop batch processing Date: Wed, 8 Aug 2018 09:27:05 -0700 Message-ID: <20180808092705.0b2d8e7d@xeon-e3> References: <20180803174933.24600-1-mcroce@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: Matteo Croce Return-path: Received: from mail-pl0-f66.google.com ([209.85.160.66]:40531 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727062AbeHHSri (ORCPT ); Wed, 8 Aug 2018 14:47:38 -0400 Received: by mail-pl0-f66.google.com with SMTP id s17-v6so1253884plp.7 for ; Wed, 08 Aug 2018 09:27:12 -0700 (PDT) In-Reply-To: <20180803174933.24600-1-mcroce@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, 3 Aug 2018 19:49:33 +0200 Matteo Croce 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 > --- > 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