mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Fix command line option decoding
LVM has huge set of options now - it's approaching 60 short-arg less options and we get interesting case of misdetection for 'merge' option which has been put into the middle of options with 'short_arg' - thus certainly past 65. (ASCII 'A'). To avoid confusion of short_arg with long_opt number - add '128' to all such non-short-arg options.
This commit is contained in:
parent
b91e3e9083
commit
bf93b4ddfe
@ -1,5 +1,6 @@
|
||||
Version 2.02.89 -
|
||||
==================================
|
||||
Fix command line option decoding.
|
||||
Reset LV status when unlinking LV from VG.
|
||||
Fix overly strict extent-count divisibility requirements for striped mirrors.
|
||||
Fix rounding direction in lvresize when reducing volume size.
|
||||
|
@ -641,7 +641,7 @@ static void _add_getopt_arg(int arg, char **ptr, struct option **o)
|
||||
if (a->short_arg)
|
||||
(*o)->val = a->short_arg;
|
||||
else
|
||||
(*o)->val = arg;
|
||||
(*o)->val = arg + 128;
|
||||
(*o)++;
|
||||
}
|
||||
#endif
|
||||
@ -662,7 +662,7 @@ static int _find_arg(struct command *com, int opt)
|
||||
* the_args.
|
||||
*/
|
||||
if ((a->short_arg && (opt == a->short_arg)) ||
|
||||
(!a->short_arg && (opt == arg)))
|
||||
(!a->short_arg && (opt == (arg + 128))))
|
||||
return arg;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user