diff options
author | Roopa Prabhu <roopa@cumulusnetworks.com> | 2015-10-15 15:23:50 -0700 |
---|---|---|
committer | Stephen Hemminger <shemming@brocade.com> | 2015-10-18 21:57:46 -0700 |
commit | 8b21cef12943cab841ba9adabb8ce2360b04c65e (patch) | |
tree | d8e45d77b384c1aa5b37fca0ab1148b9df90c532 /ip/iproute.c | |
parent | 4d45bf3bafa6960720193dbf57042a3b43b73868 (diff) | |
download | platform_external_iproute2-8b21cef12943cab841ba9adabb8ce2360b04c65e.tar.gz platform_external_iproute2-8b21cef12943cab841ba9adabb8ce2360b04c65e.tar.bz2 platform_external_iproute2-8b21cef12943cab841ba9adabb8ce2360b04c65e.zip |
ip route get: change exit to return to support batch commands
replace exit with return -2 on rtnl_talk failure
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Diffstat (limited to 'ip/iproute.c')
-rw-r--r-- | ip/iproute.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ip/iproute.c b/ip/iproute.c index da25548c..b137f555 100644 --- a/ip/iproute.c +++ b/ip/iproute.c @@ -1643,7 +1643,7 @@ static int iproute_get(int argc, char **argv) req.r.rtm_family = AF_INET; if (rtnl_talk(&rth, &req.n, &req.n, sizeof(req)) < 0) - exit(2); + return -2; if (connected && !from_ok) { struct rtmsg *r = NLMSG_DATA(&req.n); |