mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
commands: compensate --uuid
As we now user binary search - it's nondeterministict which of the same 'args' will be give - so duplicates need 'extra' care. So provide same hack for output for --uuidstr_ARG as for input. Solves 'pvscan -u'.
This commit is contained in:
parent
00f299b932
commit
56deed9d54
@ -866,6 +866,11 @@ static void add_opt_arg(struct command *cmd, char *str, int *takes_arg, int requ
|
|||||||
}
|
}
|
||||||
|
|
||||||
opt = opt_str_to_num(cmd, str);
|
opt = opt_str_to_num(cmd, str);
|
||||||
|
|
||||||
|
/* If the binary-search finds uuidstr_ARG switch to uuid_ARG */
|
||||||
|
if (opt == uuidstr_ARG)
|
||||||
|
opt = uuid_ARG;
|
||||||
|
|
||||||
skip:
|
skip:
|
||||||
if (required > 0)
|
if (required > 0)
|
||||||
cmd->required_opt_args[cmd->ro_count++].opt = opt;
|
cmd->required_opt_args[cmd->ro_count++].opt = opt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user