diff options
author | David Teigland <teigland@redhat.com> | 2014-04-16 09:04:56 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2014-04-16 09:04:56 -0500 |
commit | c98d6583739af4b785e4e18237867bbb0f02e149 (patch) | |
tree | 6d2ff108bcd5c312eeda6e56715ac42018ac6797 | |
parent | 412b7cad1c993d0e80b2036e6214c855330440e6 (diff) | |
download | lvm2-dev-dct-process-v11.tar.gz |
toollib: rename flagdev-dct-process-v11
Use a more descriptive name.
-rw-r--r-- | tools/commands.h | 30 | ||||
-rw-r--r-- | tools/toollib.c | 8 | ||||
-rw-r--r-- | tools/tools.h | 4 |
3 files changed, 21 insertions, 21 deletions
diff --git a/tools/commands.h b/tools/commands.h index ca09f2ed3..240651fb5 100644 --- a/tools/commands.h +++ b/tools/commands.h @@ -324,7 +324,7 @@ xx(lvcreate, xx(lvdisplay, "Display information about a logical volume", - PERMITTED_READ_ONLY | ENABLE_ALL_VGS, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "lvdisplay\n" "\t[-a|--all]\n" "\t[-c|--colon]\n" @@ -525,7 +525,7 @@ xx(lvresize, xx(lvs, "Display information about logical volumes", - PERMITTED_READ_ONLY | ENABLE_ALL_VGS, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "lvs" "\n" "\t[-a|--all]\n" "\t[--aligned]\n" @@ -558,7 +558,7 @@ xx(lvs, xx(lvscan, "List all logical volumes in all volume groups", - PERMITTED_READ_ONLY | ENABLE_ALL_VGS, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "lvscan " "\n" "\t[-a|--all]\n" "\t[-b|--blockdevice] " "\n" @@ -710,13 +710,13 @@ xx(pvdisplay, options_ARG, separator_ARG, short_ARG, sort_ARG, unbuffered_ARG, units_ARG) /* - * pvmove needs ENABLE_ALL_VGS because it calls polldaemon which + * pvmove needs ALL_VGS_IS_DEFAULT because it calls polldaemon which * calls process_each_vg to find work. */ xx(pvmove, "Move extents from one physical volume to another", - ENABLE_ALL_VGS, + ALL_VGS_IS_DEFAULT, "pvmove " "\n" "\t[--abort]\n" "\t[-A|--autobackup {y|n}]\n" @@ -754,7 +754,7 @@ xx(pvremove, xx(pvs, "Display information about physical volumes", - CACHE_VGMETADATA | PERMITTED_READ_ONLY | ENABLE_ALL_VGS | ENABLE_ALL_DEVS, + CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | ENABLE_ALL_DEVS, "pvs" "\n" "\t[-a|--all]\n" "\t[--aligned]\n" @@ -816,7 +816,7 @@ xx(tags, xx(vgcfgbackup, "Backup volume group configuration(s)", - PERMITTED_READ_ONLY | ENABLE_ALL_VGS, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "vgcfgbackup " "\n" "\t[-d|--debug] " "\n" "\t[-f|--file filename] " "\n" @@ -848,7 +848,7 @@ xx(vgcfgrestore, xx(vgchange, "Change volume group attributes", - CACHE_VGMETADATA | PERMITTED_READ_ONLY | ENABLE_ALL_VGS, + CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "vgchange" "\n" "\t[-A|--autobackup {y|n}] " "\n" "\t[--alloc AllocationPolicy] " "\n" @@ -892,7 +892,7 @@ xx(vgchange, xx(vgck, "Check the consistency of volume group(s)", - ENABLE_ALL_VGS, + ALL_VGS_IS_DEFAULT, "vgck " "\t[-d|--debug]\n" "\t[-h|--help]\n" @@ -950,7 +950,7 @@ xx(vgcreate, xx(vgdisplay, "Display volume group information", - PERMITTED_READ_ONLY | ENABLE_ALL_VGS, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "vgdisplay " "\n" "\t[-A|--activevolumegroups]" "\n" "\t[-c|--colon | -s|--short | -v|--verbose]" "\n" @@ -989,7 +989,7 @@ xx(vgdisplay, xx(vgexport, "Unregister volume group(s) from the system", - ENABLE_ALL_VGS, + ALL_VGS_IS_DEFAULT, "vgexport " "\n" "\t[-a|--all] " "\n" "\t[-d|--debug] " "\n" @@ -1024,7 +1024,7 @@ xx(vgextend, xx(vgimport, "Register exported volume group with system", - ENABLE_ALL_VGS, + ALL_VGS_IS_DEFAULT, "vgimport " "\n" "\t[-a|--all]\n" "\t[-d|--debug] " "\n" @@ -1054,7 +1054,7 @@ xx(vgmerge, xx(vgmknodes, "Create the special files for volume group devices in /dev", - ENABLE_ALL_VGS, + ALL_VGS_IS_DEFAULT, "vgmknodes\n" "\t[-d|--debug]\n" "\t[-h|--help]\n" @@ -1118,7 +1118,7 @@ xx(vgrename, xx(vgs, "Display information about volume groups", - PERMITTED_READ_ONLY | ENABLE_ALL_VGS, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "vgs" "\n" "\t[--aligned]\n" "\t[-a|--all]\n" @@ -1150,7 +1150,7 @@ xx(vgs, xx(vgscan, "Search for all volume groups", - PERMITTED_READ_ONLY | ENABLE_ALL_VGS, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "vgscan " "\t[--cache]\n" "\t[-d|--debug]\n" diff --git a/tools/toollib.c b/tools/toollib.c index b31f6dcc1..4681abbac 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -1397,7 +1397,7 @@ int process_each_vg(struct cmd_context *cmd, struct dm_list arg_vgnames; /* str_list */ struct dm_list all_vgnames; /* name_id_list */ struct dm_list use_vgnames; /* name_id_list */ - int enable_all_vgs = (cmd->command->flags & ENABLE_ALL_VGS); + int default_all_vgs = (cmd->command->flags & ALL_VGS_IS_DEFAULT); int ret; dm_list_init(&arg_tags); @@ -1409,7 +1409,7 @@ int process_each_vg(struct cmd_context *cmd, if (ret != ECMD_PROCESSED) return ret; - if ((dm_list_empty(&arg_vgnames) && enable_all_vgs) || + if ((dm_list_empty(&arg_vgnames) && default_all_vgs) || !dm_list_empty(&arg_tags)) { ret = get_all_vgnames(cmd, &all_vgnames, 0); if (ret != ECMD_PROCESSED) @@ -1733,7 +1733,7 @@ int process_each_lv(struct cmd_context *cmd, struct dm_list arg_lvnames; /* str_list */ struct dm_list all_vgnames; /* name_id_list */ struct dm_list use_vgnames; /* name_id_list */ - int enable_all_vgs = (cmd->command->flags & ENABLE_ALL_VGS); + int default_all_vgs = (cmd->command->flags & ALL_VGS_IS_DEFAULT); int ret; dm_list_init(&arg_tags); @@ -1747,7 +1747,7 @@ int process_each_lv(struct cmd_context *cmd, if (ret != ECMD_PROCESSED) return ret; - if ((dm_list_empty(&arg_vgnames) && enable_all_vgs) || + if ((dm_list_empty(&arg_vgnames) && default_all_vgs) || !dm_list_empty(&arg_tags)) { ret = get_all_vgnames(cmd, &all_vgnames, 0); if (ret != ECMD_PROCESSED) diff --git a/tools/tools.h b/tools/tools.h index edc0f6b23..9eb3dff1c 100644 --- a/tools/tools.h +++ b/tools/tools.h @@ -102,8 +102,8 @@ struct arg_value_group_list { #define CACHE_VGMETADATA 0x00000001 #define PERMITTED_READ_ONLY 0x00000002 -#define ENABLE_ALL_VGS 0x00000004 /* run cmd on all vgs if none are named */ -#define ENABLE_ALL_DEVS 0x00000008 +#define ALL_VGS_IS_DEFAULT 0x00000004 /* run cmd on all vgs if none are named */ +#define ENABLE_ALL_DEVS 0x00000008 /* run cmd on all pvs is none are named */ /* a register of the lvm commands */ struct command { |