[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1452384132-32261-1-git-send-email-roopa@cumulusnetworks.com>
Date: Sat, 9 Jan 2016 16:02:12 -0800
From: Roopa Prabhu <roopa@...ulusnetworks.com>
To: stephen@...workplumber.org
Cc: netdev@...r.kernel.org
Subject: [PATCH iproute2] iplink: replace exit with return
From: Roopa Prabhu <roopa@...ulusnetworks.com>
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@...ulusnetworks.com>
---
ip/iplink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ip/iplink.c b/ip/iplink.c
index f30de86..c706d20 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -710,7 +710,7 @@ static int iplink_modify(int cmd, unsigned int flags, int argc, char **argv)
req.i.ifi_index = 0;
addattr32(&req.n, sizeof(req), IFLA_GROUP, group);
if (rtnl_talk(&rth, &req.n, NULL, 0) < 0)
- exit(2);
+ return -2;
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)
- exit(2);
+ return -2;
return 0;
}
--
1.9.1
Powered by blists - more mailing lists