]> git.ipfire.org Git - thirdparty/mdadm.git/commit - mdadm.c
Improve opt parsing, and distinguish long from short.
authorNeilBrown <neilb@suse.de>
Thu, 25 Nov 2010 07:58:45 +0000 (18:58 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 25 Nov 2010 07:58:45 +0000 (18:58 +1100)
commit1c7a808c4d696f6ba30c92941661a7f62eb3ff3a
tree6b09b43155cee2fc0c8b03e35857cdc4733056da
parent2bf740b39403a6a8ae5a1c5f94554959424b6ebc
Improve opt parsing, and distinguish long from short.

In several cases, two different long options map to the same short
option.  So e.g. you could give '--brief' and it would be interpreted
as '--bitmap'.  That isn't really good.

So for every shared short option, define an option number and return
that for the long option instead.  Then always check for both the
short and long options.

Also give some bugs like " mode == 'G'" which should be '== GROW'.

Signed-off-by: NeilBrown <neilb@suse.de>
ReadMe.c
mdadm.c
mdadm.h