summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2014-04-16 09:04:56 -0500
committerDavid Teigland <teigland@redhat.com>2014-04-22 13:39:49 -0500
commitcff7b1dc523f2ef3a9c0728d05b583e517c87110 (patch)
treeab0fc2acb859627908432ce3ec419b28b33db9f5
parent286e25e5a1b06f802a560f46c9596726bf993e5f (diff)
downloadlvm2-cff7b1dc523f2ef3a9c0728d05b583e517c87110.tar.gz
toollib: rename flag
Use a more descriptive name.
-rw-r--r--tools/commands.h30
-rw-r--r--tools/toollib.c8
-rw-r--r--tools/tools.h4
3 files changed, 21 insertions, 21 deletions
diff --git a/tools/commands.h b/tools/commands.h
index e5853a0ec..05b09f7b3 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"
@@ -528,7 +528,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"
@@ -563,7 +563,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"
@@ -720,13 +720,13 @@ xx(pvdisplay,
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"
@@ -764,7 +764,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"
@@ -828,7 +828,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"
@@ -861,7 +861,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"
@@ -905,7 +905,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"
@@ -963,7 +963,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"
@@ -1004,7 +1004,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"
@@ -1039,7 +1039,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"
@@ -1069,7 +1069,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"
@@ -1133,7 +1133,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"
@@ -1167,7 +1167,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..32f4ead57 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 devices (in addition to pvs) */
/* a register of the lvm commands */
struct command {