Skip to contentSkip to conversation

: Support "ip link add help" for rtnl_link API

IPROUTE Patrick McHardy 1 participant 1 message Oct 7, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

commit 91cb1e34144e62c0a9e767d1a766c1827d79f770

Author: Patrick McHardy <[email protected]>
Date:   Tue Oct 7 16:47:03 2008 +0200

[IPROUTE]: Support "ip link add help" for rtnl_link API

For some reason "ip link add help" is currently not supported when using the new rtnl_link API. Fix that.

ip/iplink.c +2 -0
index f4cbeb3..81122ae 100644
@@ -274,6 +274,8 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
 			if (strcmp(*argv, "dev") == 0) {
 				NEXT_ARG();
 			}
+			if (matches(*argv, "help") == 0)
+				usage();
 			if (*dev)
 				duparg2("dev", *argv);
 			*dev = *argv;