Make error message better on tc with wrong args.
This commit is contained in:
parent
4cca16f20e
commit
7e6b809cb9
|
|
@ -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>
|
2006-03-10 Jean Tourrilhes <jt@hpl.hp.com>
|
||||||
|
|
||||||
* Fix endless loop in netlink error handling
|
* Fix endless loop in netlink error handling
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,10 @@ int tc_class_modify(int cmd, unsigned flags, int argc, char **argv)
|
||||||
if (get_tc_classid(&handle, *argv))
|
if (get_tc_classid(&handle, *argv))
|
||||||
invarg(*argv, "invalid class ID");
|
invarg(*argv, "invalid class ID");
|
||||||
req.t.tcm_handle = handle;
|
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) {
|
if (req.t.tcm_parent) {
|
||||||
fprintf(stderr, "Error: \"root\" is duplicate parent ID.\n");
|
fprintf(stderr, "Error: \"root\" is duplicate parent ID.\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue