From: Stephen Hemminger <stephen.hemminger@vyatta.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH ethtool 5/5] ethtool: Add --version option
Date: Mon, 21 Feb 2011 22:16:24 -0800 (PST) [thread overview]
Message-ID: <1561212236.5138.1298355384916.JavaMail.root@tahiti.vyatta.com> (raw)
In-Reply-To: <1298315959.2608.73.camel@bwh-desktop>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> --- ethtool.8.in | 5 +++++
> ethtool.c | 6 ++++++
> 2 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/ethtool.8.in b/ethtool.8.in
> index 133825b..8b04335 100644
> --- a/ethtool.8.in
> +++ b/ethtool.8.in
> @@ -100,6 +100,8 @@ ethtool \- query or control network driver and
> hardware settings
>
> .B ethtool \-h|\-\-help
>
> +.B ethtool \-\-version
> + .B ethtool \-a|\-\-show\-pause
> .I ethX
>
> @@ -310,6 +312,9 @@ settings of the specified device.
> .B \-h \-\-help
> Shows a short help message.
> .TP +.B \-\-version
> +Shows the ethtool version number.
> +.TP .B \-a \-\-show\-pause
> Queries the specified Ethernet device for pause parameter information.
> .TP diff --git a/ethtool.c b/ethtool.c
> index 32a97f6..e9cb2c9 100644
> --- a/ethtool.c
> +++ b/ethtool.c
> @@ -115,6 +115,7 @@ static int do_permaddr(int fd, struct ifreq *ifr);
> static int send_ioctl(int fd, struct ifreq *ifr);
>
> static enum {
> + MODE_VERSION = -2,
> MODE_HELP = -1,
> MODE_GSET=0, MODE_SSET,
> @@ -264,6 +265,7 @@ static struct option {
> { "-P", "--show-permaddr", MODE_PERMADDR,
> "Show permanent hardware address" },
> { "-h", "--help", MODE_HELP, "Show this help" },
> + { NULL, "--version", MODE_VERSION, "Show version number" },
The standard convention is to use -V for short form of version option.
next prev parent reply other threads:[~2011-02-22 6:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 19:16 [PATCH ethtool 0/5] Add --version option and fix some bugs in show_usage() Ben Hutchings
2011-02-21 19:17 ` [PATCH ethtool 1/5] ethtool: Split show_usage() into two functions Ben Hutchings
2011-02-21 19:18 ` [PATCH ethtool 2/5] ethtool: Report an error if given an unrecognised option Ben Hutchings
2011-02-21 19:18 ` [PATCH ethtool 3/5] ethtool: Allow for long options with no short option and without a device name Ben Hutchings
2011-02-21 19:18 ` [PATCH ethtool 4/5] ethtool: Indent the no-options usage line consistently with the others Ben Hutchings
2011-02-21 19:19 ` [PATCH ethtool 5/5] ethtool: Add --version option Ben Hutchings
2011-02-22 6:16 ` Stephen Hemminger [this message]
2011-02-22 12:37 ` Ben Hutchings
2011-02-22 13:05 ` Eric Dumazet
2011-02-22 21:35 ` Jeff Garzik
2011-02-22 21:49 ` Ben Hutchings
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=1561212236.5138.1298355384916.JavaMail.root@tahiti.vyatta.com \
--to=stephen.hemminger@vyatta.com \
--cc=bhutchings@solarflare.com \
--cc=netdev@vger.kernel.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).