From: Hasso Tepper <hasso@estpak.ee>
To: Stephen Hemminger <shemminger@osdl.org>, netdev@vger.kernel.org
Subject: [IPROUTE2 PATCH] Fixes for tc help commands
Date: Sun, 10 Dec 2006 16:33:05 +0200 [thread overview]
Message-ID: <200612101633.05306.hasso@estpak.ee> (raw)
[-- Attachment #1: Type: text/plain, Size: 377 bytes --]
* "tc [class|qdisc|filter] get" doesn't exist, remove it from inline help.
* Add "replace" to "tc [class|filter] get" inline help.
* Fix "tc [class|qdisc|filter] help" output:
~$ tc class help
[snip]
Command "help" is unknown, try "tc class help".
~$
with my best wishes,
--
Hasso Tepper
Elion Enterprises Ltd. [AS3249]
Data Communication Network Administrator
[-- Attachment #2: iproute2-tc-help.patch --]
[-- Type: text/x-diff, Size: 2900 bytes --]
diff --git a/tc/tc_class.c b/tc/tc_class.c
index fb0b6b2..774497a 100644
--- a/tc/tc_class.c
+++ b/tc/tc_class.c
@@ -29,7 +29,7 @@ static void usage(void);
static void usage(void)
{
- fprintf(stderr, "Usage: tc class [ add | del | change | get ] dev STRING\n");
+ fprintf(stderr, "Usage: tc class [ add | del | change | replace | show ] dev STRING\n");
fprintf(stderr, " [ classid CLASSID ] [ root | parent CLASSID ]\n");
fprintf(stderr, " [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n");
fprintf(stderr, "\n");
@@ -315,8 +315,10 @@ int do_class(int argc, char **argv)
if (matches(*argv, "list") == 0 || matches(*argv, "show") == 0
|| matches(*argv, "lst") == 0)
return tc_class_list(argc-1, argv+1);
- if (matches(*argv, "help") == 0)
+ if (matches(*argv, "help") == 0) {
usage();
+ return 0;
+ }
fprintf(stderr, "Command \"%s\" is unknown, try \"tc class help\".\n", *argv);
return -1;
}
diff --git a/tc/tc_filter.c b/tc/tc_filter.c
index 3e102cd..008f0c1 100644
--- a/tc/tc_filter.c
+++ b/tc/tc_filter.c
@@ -32,7 +32,7 @@ static void usage(void);
static void usage(void)
{
- fprintf(stderr, "Usage: tc filter [ add | del | change | get ] dev STRING\n");
+ fprintf(stderr, "Usage: tc filter [ add | del | change | replace | show ] dev STRING\n");
fprintf(stderr, " [ pref PRIO ] [ protocol PROTO ]\n");
fprintf(stderr, " [ estimator INTERVAL TIME_CONSTANT ]\n");
fprintf(stderr, " [ root | classid CLASSID ] [ handle FILTERID ]\n");
@@ -363,8 +363,10 @@ int do_filter(int argc, char **argv)
if (matches(*argv, "list") == 0 || matches(*argv, "show") == 0
|| matches(*argv, "lst") == 0)
return tc_filter_list(argc-1, argv+1);
- if (matches(*argv, "help") == 0)
+ if (matches(*argv, "help") == 0) {
usage();
+ return 0;
+ }
fprintf(stderr, "Command \"%s\" is unknown, try \"tc filter help\".\n", *argv);
return -1;
}
diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c
index 0b16923..1256f07 100644
--- a/tc/tc_qdisc.c
+++ b/tc/tc_qdisc.c
@@ -29,7 +29,7 @@ static int usage(void);
static int usage(void)
{
- fprintf(stderr, "Usage: tc qdisc [ add | del | replace | change | get ] dev STRING\n");
+ fprintf(stderr, "Usage: tc qdisc [ add | del | replace | change | show ] dev STRING\n");
fprintf(stderr, " [ handle QHANDLE ] [ root | ingress | parent CLASSID ]\n");
fprintf(stderr, " [ estimator INTERVAL TIME_CONSTANT ]\n");
fprintf(stderr, " [ [ QDISC_KIND ] [ help | OPTIONS ] ]\n");
@@ -316,8 +316,10 @@ int do_qdisc(int argc, char **argv)
if (matches(*argv, "list") == 0 || matches(*argv, "show") == 0
|| matches(*argv, "lst") == 0)
return tc_qdisc_list(argc-1, argv+1);
- if (matches(*argv, "help") == 0)
+ if (matches(*argv, "help") == 0) {
usage();
+ return 0;
+ }
fprintf(stderr, "Command \"%s\" is unknown, try \"tc qdisc help\".\n", *argv);
return -1;
}
reply other threads:[~2006-12-10 14:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200612101633.05306.hasso@estpak.ee \
--to=hasso@estpak.ee \
--cc=netdev@vger.kernel.org \
--cc=shemminger@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).