]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
Continue after errors in -batch
authorMichele Petrazzo - Unipex <michele.petrazzo@unipex.it>
Sat, 6 Mar 2010 08:56:53 +0000 (08:56 +0000)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Tue, 9 Mar 2010 15:50:19 +0000 (07:50 -0800)
Allow ip to process all the file passed with the -batch argument when
is passed also the -force switch

Signed-off-by: Michele Petrazzo <michele.petrazzo@unipex.it>
ip/ipaddress.c

index 3186f9cbb63bf1e8f24a5fe1cce79ce50d479b47..48f7b1e3e1441f81feb316ac23f2d3d380a5923f 100644 (file)
@@ -1039,7 +1039,7 @@ static int ipaddr_modify(int cmd, int flags, int argc, char **argv)
        }
        if (l && matches(d, l) != 0) {
                fprintf(stderr, "\"dev\" (%s) must match \"label\" (%s).\n", d, l);
-               exit(1);
+               return -1;
        }
 
        if (peer_len == 0 && local_len) {
@@ -1104,7 +1104,7 @@ static int ipaddr_modify(int cmd, int flags, int argc, char **argv)
        }
 
        if (rtnl_talk(&rth, &req.n, 0, 0, NULL, NULL, NULL) < 0)
-               exit(2);
+               return -2;
 
        return 0;
 }