]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Support "ip link add help" for rtnl_link API
authorPatrick McHardy <kaber@trash.net>
Tue, 7 Oct 2008 15:16:08 +0000 (17:16 +0200)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Mon, 13 Oct 2008 14:02:44 +0000 (07:02 -0700)
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>
ip/iplink.c

index f4cbeb3ea7237934f8f563cea0d633ac609b8917..81122aec95fecf708a9af3519540c0e35b604c3c 100644 (file)
@@ -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;