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

login
register
mail settings
Submitter Patrick McHardy
Date Oct. 7, 2008, 3:16 p.m.
Message ID <48EB7D38.1030503@trash.net>
Download mbox | patch
Permalink /patch/3182/
State Not Applicable
Headers show

Comments

Patrick McHardy - Oct. 7, 2008, 3:16 p.m.

Patch

commit 91cb1e34144e62c0a9e767d1a766c1827d79f770
Author: Patrick McHardy <kaber@trash.net>
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.
    
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/ip/iplink.c b/ip/iplink.c
index f4cbeb3..81122ae 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -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;