From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matteo Croce Subject: [PATCH iproute2] ip link: don't stop batch processing Date: Fri, 3 Aug 2018 19:49:33 +0200 Message-ID: <20180803174933.24600-1-mcroce@redhat.com> To: netdev@vger.kernel.org, stephen@networkplumber.org Return-path: Received: from mail-wm0-f68.google.com ([74.125.82.68]:54783 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727433AbeHCTqy (ORCPT ); Fri, 3 Aug 2018 15:46:54 -0400 Received: by mail-wm0-f68.google.com with SMTP id c14-v6so7106781wmb.4 for ; Fri, 03 Aug 2018 10:49:35 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: 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) { -- 2.17.1