summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2017-04-03 15:24:46 -0500
committerDavid Teigland <teigland@redhat.com>2017-04-03 15:49:24 -0500
commitdece723dc72f93cb1ea9c21bd1a6518435832c88 (patch)
treede1e3a767653f3a2e15fddf6750cb4b9b4b6606c
parent162272e5a5ad5249c30f024c9dc69f5a1ece8fea (diff)
downloadlvm2-dece723dc72f93cb1ea9c21bd1a6518435832c88.tar.gz
commands: recognize ignored options
-rw-r--r--tools/lvmcmdline.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 6f7048117..bf7e21660 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -1154,7 +1154,7 @@ static void _set_valid_args_for_command_name(int ci)
int num_args = 0;
int opt_enum; /* foo_ARG from args.h */
int opt_syn;
- int i, ro, oo;
+ int i, ro, oo, io;
/*
* all_args is indexed by the foo_ARG enum vals
@@ -1173,6 +1173,10 @@ static void _set_valid_args_for_command_name(int ci)
opt_enum = commands[i].optional_opt_args[oo].opt;
all_args[opt_enum] = 1;
}
+ for (io = 0; io < commands[i].io_count; io++) {
+ opt_enum = commands[i].ignore_opt_args[io].opt;
+ all_args[opt_enum] = 1;
+ }
}
for (i = 0; i < ARG_COUNT; i++) {