summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2013-08-29 16:53:32 -0500
committerDavid Teigland <teigland@redhat.com>2014-06-18 12:42:36 -0500
commitc30d634adf79f0cab1289a42ed69e7c685c54767 (patch)
tree81a2ab190adcca58e97787e9c648b8fddca0dc7f
parent82bbc26187e33b992a215669f2c49ceb4c688da9 (diff)
downloadlvm2-c30d634adf79f0cab1289a42ed69e7c685c54767.tar.gz
toollib: add ENABLE_ALL_DEVS flag
The ENABLE_ALL_DEVS flag is added to the command structure for commands that should process all devs (pvs and non-pvs) when they call process_each_pv and the command includes the --all arg. This will be used in a later process_each_pv patch.
-rw-r--r--tools/commands.h6
-rw-r--r--tools/tools.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/tools/commands.h b/tools/commands.h
index 0ecd189c6..5ff63cbce 100644
--- a/tools/commands.h
+++ b/tools/commands.h
@@ -434,7 +434,7 @@ xx(lvmchange,
xx(lvmdiskscan,
"List devices that may be used as physical volumes",
- PERMITTED_READ_ONLY,
+ PERMITTED_READ_ONLY | ENABLE_ALL_DEVS,
"lvmdiskscan\n"
"\t[--commandprofile ProfileName]\n"
"\t[-d|--debug]\n"
@@ -716,7 +716,7 @@ xx(pvdata,
xx(pvdisplay,
"Display various attributes of physical volume(s)",
- CACHE_VGMETADATA | PERMITTED_READ_ONLY,
+ CACHE_VGMETADATA | PERMITTED_READ_ONLY | ENABLE_ALL_DEVS,
"pvdisplay\n"
"\t[-c|--colon]\n"
"\t[--commandprofile ProfileName]\n"
@@ -808,7 +808,7 @@ xx(pvremove,
xx(pvs,
"Display information about physical volumes",
- CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT,
+ CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT | ENABLE_ALL_DEVS,
"pvs" "\n"
"\t[-a|--all]\n"
"\t[--aligned]\n"
diff --git a/tools/tools.h b/tools/tools.h
index cf08e0e22..c2736cb19 100644
--- a/tools/tools.h
+++ b/tools/tools.h
@@ -103,6 +103,7 @@ struct arg_value_group_list {
#define CACHE_VGMETADATA 0x00000001
#define PERMITTED_READ_ONLY 0x00000002
#define ALL_VGS_IS_DEFAULT 0x00000004 /* run cmd on all vgs if none are named */
+#define ENABLE_ALL_DEVS 0x00000008
/* a register of the lvm commands */
struct command {