1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +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:
Zdenek Kabelac 2017-02-17 13:57:59 +01:00
parent 00f299b932
commit 56deed9d54

View File

@ -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);
/* If the binary-search finds uuidstr_ARG switch to uuid_ARG */
if (opt == uuidstr_ARG)
opt = uuid_ARG;
skip:
if (required > 0)
cmd->required_opt_args[cmd->ro_count++].opt = opt;