mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-28 02:50:41 +03:00
lvm: report error if options are set before command
Previously, strange parsing errors were reported.
This commit is contained in:
parent
442d60842d
commit
56768ce36b
@ -3438,6 +3438,11 @@ int lvm2_main(int argc, char **argv)
|
||||
if (!alias && (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")))
|
||||
argv[1] = (char *)"help";
|
||||
|
||||
if (!alias && (*argv[1] == '-')) {
|
||||
log_error("Specify options after a command: lvm [command] [options].");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(cmd = init_lvm(0, 0)))
|
||||
return -1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user