From: Michael Tokarev <mjt@tls.msk.ru>
To: Neil Brown <neilb@suse.de>
Cc: Andreas Haumer <andreas@xss.co.at>, linux-raid@vger.kernel.org
Subject: Re: mdadm 2.1: command line option parsing bug?
Date: Tue, 22 Nov 2005 14:21:34 +0300 [thread overview]
Message-ID: <4382FF3E.7070303@tls.msk.ru> (raw)
In-Reply-To: <17282.22120.327672.720044@cse.unsw.edu.au>
Neil Brown wrote:
[]
> I would like it to take an argument in contexts where --bitmap was
> meaningful (Create, Assemble, Grow) and not where --brief is
> meaningful (Examine, Detail). but I don't know if getopt_long will
> allow the 'short_opt' string to be changed half way through
> processing...
getopt allows you to change both long and short options set
before every call (provided argv&argc are intact). But.
Please, pretty please, don't implement the same options with
different meaning. It's confusing at best. Assign short options
to frequently-used commands, and leave only long options for the
rest. I dunno whichever of --brief or --bitmap is more frequent,
I'd say both can be long-only, but since -b already stands for
--brief, don't use it for --bitmap.
> At the very least, I can print a message if '-b' is being interpreted
> as as --brief, but the option argument is present.
>
> -a has the same problem (--add vs --auto).
And this is also bad. In my opinion anyway.
/mjt
next prev parent reply other threads:[~2005-11-22 11:21 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-18 19:34 mdadm 2.1: command line option parsing bug? Andreas Haumer
2005-11-21 23:21 ` Neil Brown
2005-11-22 11:21 ` Michael Tokarev [this message]
2005-11-24 5:15 ` Neil Brown
2005-11-22 15:41 ` Molle Bestefich
2005-11-24 5:25 ` Neil Brown
2005-11-24 7:31 ` Ross Vandegrift
2005-12-15 1:53 ` Molle Bestefich
2005-12-15 4:19 ` Neil Brown
2005-12-15 10:37 ` Molle Bestefich
2005-11-22 22:05 ` Andre Noll
2005-11-26 14:04 ` RAID0 performance question JaniD++
2005-11-26 15:56 ` Raz Ben-Jehuda(caro)
2005-11-26 16:08 ` JaniD++
2005-11-26 17:11 ` Lajber Zoltan
2005-11-26 17:34 ` JaniD++
2005-11-26 19:47 ` Lajber Zoltan
2005-11-26 23:27 ` Neil Brown
2005-11-26 23:37 ` JaniD++
2005-11-27 15:39 ` Al Boldi
2005-11-27 16:21 ` JaniD++
2005-11-27 17:40 ` Al Boldi
2005-11-27 19:02 ` JaniD++
2005-11-30 23:13 ` JaniD++
2005-12-02 19:53 ` Al Boldi
2005-12-18 0:13 ` JaniD++
2005-12-19 11:16 ` Al Boldi
2005-11-22 1:14 ` JaniD++
2005-11-23 10:48 ` JaniD++
2005-12-21 1:40 ` Neil Brown
2005-11-22 1:56 ` JaniD++
2005-12-22 4:49 ` Neil Brown
2005-11-23 9:44 ` JaniD++
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=4382FF3E.7070303@tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=andreas@xss.co.at \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.