]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Make error message better on tc with wrong args.
authorshemminger <shemminger>
Fri, 10 Mar 2006 23:40:56 +0000 (23:40 +0000)
committershemminger <shemminger>
Fri, 10 Mar 2006 23:40:56 +0000 (23:40 +0000)
ChangeLog
tc/tc_class.c

index 49a1e9cf000f538cda02ac0851d4d0ca3a279d42..4075d1efb7b3832752308e2ce1266a85460fc953 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-03-10 Dale Sedivec <darkness@caliginous.net>
+       
+       * Warn when using "handle" instead of "classid" with "tc class"
+
 2006-03-10  Jean Tourrilhes <jt@hpl.hp.com>
 
        * Fix endless loop in netlink error handling
index c4b27ebfa66ea6fe3066d8269c97bacb4d3c0350..894caa12a5d4aa17e41a6da8618e92651217147f 100644 (file)
@@ -76,7 +76,10 @@ int tc_class_modify(int cmd, unsigned flags, int argc, char **argv)
                        if (get_tc_classid(&handle, *argv))
                                invarg(*argv, "invalid class ID");
                        req.t.tcm_handle = handle;
-               } else if (strcmp(*argv, "root") == 0) {
+               } else if (strcmp(*argv, "handle") == 0) {
+                       fprintf(stderr, "Error: try \"classid\" instead of \"handle\"\n");
+                       return -1;
+               } else if (strcmp(*argv, "root") == 0) {
                        if (req.t.tcm_parent) {
                                fprintf(stderr, "Error: \"root\" is duplicate parent ID.\n");
                                return -1;