]> sourceware.org Git - lvm2.git/commitdiff
vgextend: fix use of the wrong flag
authorDavid Teigland <teigland@redhat.com>
Fri, 23 Oct 2015 15:21:06 +0000 (10:21 -0500)
committerDavid Teigland <teigland@redhat.com>
Fri, 23 Oct 2015 15:21:06 +0000 (10:21 -0500)
The ONE_VGNAME_ARG was being passed and tested as
vg_read() flag but it's a cmd struct flag.

(It affects command arg processing in toollib,
not vg_read behavior.  Flags related to command
processing are generally cmd struct flags, while
vg_read arg flags are generally related to vg_read
behavior.)

tools/commands.h
tools/toollib.c
tools/vgextend.c

index 92d13fdf0592b91aed113280679c51f35a57b2db..ae5dff7fd5b1f3c22516c4e7331e9873c1f5f941 100644 (file)
@@ -1211,7 +1211,7 @@ xx(vgexport,
 
 xx(vgextend,
    "Add physical volumes to a volume group",
-   0,
+   ONE_VGNAME_ARG,
    "vgextend\n"
    "\t[-A|--autobackup y|n]\n"
    "\t[--restoremissing]\n"
index b17fe53984a59549bbc5d56fa21f58285cdd7b97..39bf0ac12beea01063a18917ea095a507ec393c9 100644 (file)
@@ -2032,7 +2032,7 @@ int process_each_vg(struct cmd_context *cmd, int argc, char **argv,
        struct dm_list vgnameids_to_process;    /* vgnameid_list */
 
        int enable_all_vgs = (cmd->command->flags & ALL_VGS_IS_DEFAULT);
-       unsigned one_vgname_arg = (flags & ONE_VGNAME_ARG);
+       int one_vgname_arg = (cmd->command->flags & ONE_VGNAME_ARG);
        int ret;
 
        /* Disable error in vg_read so we can print it from ignore_vg. */
index 581c21127bbf5294f42e70d7001e833d1ea120cb..bddc22f92bd1cf0e9dc9e13ce095714834617ee3 100644 (file)
@@ -170,7 +170,7 @@ int vgextend(struct cmd_context *cmd, int argc, char **argv)
                return_ECMD_FAILED;
 
        ret = process_each_vg(cmd, argc, argv,
-                             READ_FOR_UPDATE | ONE_VGNAME_ARG, handle,
+                             READ_FOR_UPDATE, handle,
                              restoremissing ? &_vgextend_restoremissing : &_vgextend_single);
 
        destroy_processing_handle(cmd, handle);
This page took 0.049852 seconds and 5 git commands to generate.