From: Patrick McHardy <kaber@trash.net>
To: Arkadiusz Miskiewicz <arekm@maven.pl>
Cc: Linux Netdev List <netdev@vger.kernel.org>,
Stephen Hemminger <shemminger@vyatta.com>
Subject: Re: [IPROUTE]: Fix up "ip link" help text
Date: Tue, 07 Oct 2008 23:02:17 +0200 [thread overview]
Message-ID: <48EBCE59.3080401@trash.net> (raw)
In-Reply-To: <200810072206.03062.arekm@maven.pl>
[-- Attachment #1: Type: text/plain, Size: 312 bytes --]
Arkadiusz Miskiewicz wrote:
> Runtime dependand help doesn't look sane. Help should always show all possible
> options/command while trying to use unsupported option should display error
> message.
>
That makes sense. But don't complain to me about the quality
of the error messages afterwards please :)
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 3127 bytes --]
commit 8c6321466df9a452ac58e09d32edd6c5b4ea0d17
Author: Patrick McHardy <kaber@trash.net>
Date: Tue Oct 7 23:00:59 2008 +0200
[IPROUTE]: Fix up "ip link" help text
Add help for "ip link add". Also fix up the "ip link set" help text:
- the flags are not mutually exclusive as suggested by the current text,
up/down states and on/off are mutually exclusive.
- txqueuelen, name etc. have nothing to do with the flags and on/off states
at all and are certainly not mutually exclusive, fix formatting and make
it conform the other helptexts better.
Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/ip/iplink.c b/ip/iplink.c
index 6e9ac71..781fbd2 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -41,19 +41,30 @@ static void usage(void) __attribute__((noreturn));
void iplink_usage(void)
{
- fprintf(stderr, "Usage: ip link set DEVICE { up | down |\n");
- fprintf(stderr, " arp { on | off } |\n");
- fprintf(stderr, " dynamic { on | off } |\n");
- fprintf(stderr, " multicast { on | off } |\n");
- fprintf(stderr, " allmulticast { on | off } |\n");
- fprintf(stderr, " promisc { on | off } |\n");
- fprintf(stderr, " trailers { on | off } |\n");
- fprintf(stderr, " txqueuelen PACKETS |\n");
- fprintf(stderr, " name NEWNAME |\n");
- fprintf(stderr, " address LLADDR | broadcast LLADDR |\n");
- fprintf(stderr, " mtu MTU }\n");
- fprintf(stderr, " netns PID }\n");
+ fprintf(stderr, "Usage: ip link add [ name ] NAME\n");
+ fprintf(stderr, " [ link DEV ]\n");
+ fprintf(stderr, " [ txqueuelen PACKETS ]\n");
+ fprintf(stderr, " [ address LLADDR ]\n");
+ fprintf(stderr, " [ broadcast LLADDR ]\n");
+ fprintf(stderr, " [ mtu MTU ]\n");
+ fprintf(stderr, " type TYPE [ ARGS ]\n");
+ fprintf(stderr, "\n");
+ fprintf(stderr, " ip link set DEVICE [ { up | down } ]\n");
+ fprintf(stderr, " [ arp { on | off } ]\n");
+ fprintf(stderr, " [ dynamic { on | off } ]\n");
+ fprintf(stderr, " [ multicast { on | off } ]\n");
+ fprintf(stderr, " [ allmulticast { on | off } ]\n");
+ fprintf(stderr, " [ promisc { on | off } ]\n");
+ fprintf(stderr, " [ trailers { on | off } ]\n");
+ fprintf(stderr, " [ txqueuelen PACKETS ]\n");
+ fprintf(stderr, " [ name NEWNAME ]\n");
+ fprintf(stderr, " [ address LLADDR ]\n");
+ fprintf(stderr, " [ broadcast LLADDR ]\n");
+ fprintf(stderr, " [ mtu MTU ]\n");
+ fprintf(stderr, " [ netns PID ]\n");
fprintf(stderr, " ip link show [ DEVICE ]\n");
+ fprintf(stderr, "\n");
+ fprintf(stderr, "TYPE := { vlan | veth | dummy | ifb | macvlan }\n");
exit(-1);
}
next prev parent reply other threads:[~2008-10-07 21:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 15:17 [IPROUTE]: Fix up "ip link" help text Patrick McHardy
[not found] ` <200810072206.03062.arekm@maven.pl>
2008-10-07 21:02 ` Patrick McHardy [this message]
2008-10-07 21:18 ` Stephen Hemminger
2008-10-13 14:21 ` Stephen Hemminger
2008-10-13 16:36 ` Ben Greear
[not found] ` <200810131917.00864.arekm@maven.pl>
2008-10-13 18:07 ` Stephen Hemminger
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=48EBCE59.3080401@trash.net \
--to=kaber@trash.net \
--cc=arekm@maven.pl \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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).