From: Michele Petrazzo - Unipex Date: Sat, 6 Mar 2010 08:56:53 +0000 (+0000) Subject: Continue after errors in -batch X-Git-Tag: v2.6.34~15^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1db61e022d5f4318b9b236fef48be48a65e00878;p=thirdparty%2Fiproute2.git Continue after errors in -batch Allow ip to process all the file passed with the -batch argument when is passed also the -force switch Signed-off-by: Michele Petrazzo --- diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 3186f9cbb..48f7b1e3e 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -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; }