]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip link: don't stop batch processing
authorMatteo Croce <mcroce@redhat.com>
Fri, 3 Aug 2018 17:49:33 +0000 (19:49 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 8 Aug 2018 16:24:47 +0000 (09:24 -0700)
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>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/ipaddress.c

index 6c306ab7599d91d3acf764522298dc3cc799d950..b7b78f6e000fec8b3797228dc060ff9bdc6d6e4b 100644 (file)
@@ -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) {