From: shemminger Date: Fri, 10 Mar 2006 23:40:56 +0000 (+0000) Subject: Make error message better on tc with wrong args. X-Git-Tag: ss-060314~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e6b809cb96ace7e310935bacb3309b819cd762b;p=thirdparty%2Fiproute2.git Make error message better on tc with wrong args. --- diff --git a/ChangeLog b/ChangeLog index 49a1e9cf0..4075d1efb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-03-10 Dale Sedivec + + * Warn when using "handle" instead of "classid" with "tc class" + 2006-03-10 Jean Tourrilhes * Fix endless loop in netlink error handling diff --git a/tc/tc_class.c b/tc/tc_class.c index c4b27ebfa..894caa12a 100644 --- a/tc/tc_class.c +++ b/tc/tc_class.c @@ -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;