diff options
author | Patrick Caulfield <pcaulfie@redhat.com> | 2001-11-23 12:00:52 +0000 |
---|---|---|
committer | Patrick Caulfield <pcaulfie@redhat.com> | 2001-11-23 12:00:52 +0000 |
commit | 67a53211341a238e5ec7bd14bd19b7b8ced8bd33 (patch) | |
tree | ed85050be28b846590cdbf26993ebeaa27da3e7b | |
parent | b590ecf83a506a2c915247774c24cd509268ad08 (diff) | |
download | lvm2-67a53211341a238e5ec7bd14bd19b7b8ced8bd33.tar.gz |
Bring Alasdairs 64bit fixes into this tree.
-rw-r--r-- | tools/args.h | 2 | ||||
-rw-r--r-- | tools/lvm.c | 7 |
2 files changed, 6 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 929292609..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; } @@ -721,6 +721,7 @@ static int init(void) /* FIXME: Override from config file. (Append trailing slash if reqd) */ cmd->dev_dir = "/dev/"; + dm_set_dev_dir(cmd->dev_dir); if (!(cmd->cf = create_config_file())) { stack; @@ -744,6 +745,8 @@ static int init(void) __init_log(cmd->cf); } + dm_log_init(print_log); + if (!dev_cache_setup(cmd->cf)) { goto out; } |