From 60140607cfae39b9041ffa023e43ac28b282322d Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Thu, 22 Nov 2001 14:37:07 +0000 Subject: [PATCH] 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 --- tools/args.h | 2 +- tools/lvm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/args.h b/tools/args.h index 74f96ea95..24107af39 100644 --- a/tools/args.h +++ b/tools/args.h @@ -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) diff --git a/tools/lvm.c b/tools/lvm.c index 8e82ce1bf..7f654d784 100644 --- a/tools/lvm.c +++ b/tools/lvm.c @@ -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; } -- 2.43.5