1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-25 01:34:38 +03:00

o Make sure that every switch has a short option, even if it's

non-displayable so we can remove the pointer mangling that was
   breaking 64bit arch.s
This commit is contained in:
Joe Thornber 2001-11-22 14:37:07 +00:00
parent 3fbf02dc82
commit 904539476a
2 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ xx(uuid_ARG, 'u', "uuid", NULL)
xx(uuidlist_ARG, 'U', "uuidlist", NULL)
xx(verbose_ARG, 'v', "verbose", NULL)
xx(volumegroup_ARG, 'V', "volumegroup", NULL)
xx(version_ARG, '\0', "version", NULL)
xx(version_ARG, (char) 0x1, "version", NULL)
xx(allocation_ARG, 'x', "allocation", yes_no_arg)
xx(yes_ARG, 'y', "yes", NULL)
xx(zero_ARG, 'Z', "zero", yes_no_arg)

View File

@ -390,7 +390,7 @@ static void add_getopt_arg(int arg, char **ptr, struct option **o)
(*o)->name = a->long_arg + 2;
(*o)->has_arg = a->fn ? 1 : 0;
(*o)->flag = NULL;
(*o)->val = a->short_arg ? a->short_arg : (int) a;
(*o)->val = a->short_arg;
(*o)++;
}
}
@ -460,7 +460,7 @@ static struct arg *find_arg(struct command *com, int opt)
for (i = 0; i < com->num_args; i++) {
a = the_args + com->valid_args[i];
if ((opt == a->short_arg) || (opt == (int) a))
if (opt == a->short_arg)
return a;
}