iplink: replace exit with return
This patch replaces exits with returns in iplink command. Helps to continue on errors when invoked with ip -force -batch. Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
parent
de7db5d857
commit
f921f567d1
|
|
@ -710,7 +710,7 @@ static int iplink_modify(int cmd, unsigned int flags, int argc, char **argv)
|
||||||
req.i.ifi_index = 0;
|
req.i.ifi_index = 0;
|
||||||
addattr32(&req.n, sizeof(req), IFLA_GROUP, group);
|
addattr32(&req.n, sizeof(req), IFLA_GROUP, group);
|
||||||
if (rtnl_talk(&rth, &req.n, NULL, 0) < 0)
|
if (rtnl_talk(&rth, &req.n, NULL, 0) < 0)
|
||||||
exit(2);
|
return -2;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -809,7 +809,7 @@ static int iplink_modify(int cmd, unsigned int flags, int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtnl_talk(&rth, &req.n, NULL, 0) < 0)
|
if (rtnl_talk(&rth, &req.n, NULL, 0) < 0)
|
||||||
exit(2);
|
return -2;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue