summaryrefslogtreecommitdiff
path: root/tools/lvm.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2017-03-07 11:47:44 -0600
committerDavid Teigland <teigland@redhat.com>2017-03-08 11:03:02 -0600
commit690f60473352e9909df95fae96a5d99b8b0c9db7 (patch)
tree2f62dcad94b66eccc419675703284b25185e3765 /tools/lvm.c
parentf48e6b2690c43120ec87e4fa913b2bd952a53511 (diff)
downloadlvm2-690f60473352e9909df95fae96a5d99b8b0c9db7.tar.gz
commands: combine duplicate arrays for opt and val
command.c and lvmcmdline.c each had a full array defining all options and values. This duplication was not removed when the command.c code was merged into the run time.
Diffstat (limited to 'tools/lvm.c')
-rw-r--r--tools/lvm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/lvm.c b/tools/lvm.c
index 5fd991840..055400791 100644
--- a/tools/lvm.c
+++ b/tools/lvm.c
@@ -97,8 +97,8 @@ static char *_list_args(const char *text, int state)
while (match_no < cname->num_args) {
char s[3];
char c;
- if (!(c = (_cmdline->arg_props +
- cname->valid_args[match_no++])->short_arg))
+ if (!(c = (_cmdline->opt_names +
+ cname->valid_args[match_no++])->short_opt))
continue;
sprintf(s, "-%c", c);
@@ -113,8 +113,8 @@ static char *_list_args(const char *text, int state)
while (match_no - cname->num_args < cname->num_args) {
const char *l;
- l = (_cmdline->arg_props +
- cname->valid_args[match_no++ - cname->num_args])->long_arg;
+ l = (_cmdline->opt_names +
+ cname->valid_args[match_no++ - cname->num_args])->long_opt;
if (*(l + 2) && !strncmp(text, l, len))
return strdup(l);
}