]> sourceware.org Git - lvm2.git/commitdiff
o Make sure that every switch has a short option, even if it's
authorJoe Thornber <thornber@redhat.com>
Thu, 22 Nov 2001 14:37:07 +0000 (14:37 +0000)
committerJoe Thornber <thornber@redhat.com>
Thu, 22 Nov 2001 14:37:07 +0000 (14:37 +0000)
   non-displayable so we can remove the pointer mangling that was
   breaking 64bit arch.s

tools/args.h
tools/lvm.c

index 74f96ea951d81a168165375692f2c8c62c55ecee..24107af394900dfe4420b70f2cbd94a3fa248265 100644 (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)
index 8e82ce1bfe31bf8a475b508231c6e45d3ddf1134..7f654d784cef3abeef9e02f473a723ff47ceed0f 100644 (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;
        }
 
This page took 0.040091 seconds and 5 git commands to generate.