summaryrefslogtreecommitdiff
path: root/tools/vgdisplay.c
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2013-12-03 14:41:25 +0100
committerPeter Rajnoha <prajnoha@redhat.com>2013-12-03 14:43:00 +0100
commit6232cac86cea332efb1e538fc8cd1922dc35bd01 (patch)
treec7e13ccfda97df19a49d1849880916ccd7e6fd96 /tools/vgdisplay.c
parentc35394959758ec17389529f95a33bf7f5b15c56b (diff)
downloadlvm2-6232cac86cea332efb1e538fc8cd1922dc35bd01.tar.gz
vgdisplay: select only active volumes groups if -A option is used
Where "active" means "at least one LV is active in the volume group".
Diffstat (limited to 'tools/vgdisplay.c')
-rw-r--r--tools/vgdisplay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/vgdisplay.c b/tools/vgdisplay.c
index afc92fe74..81ffbd96f 100644
--- a/tools/vgdisplay.c
+++ b/tools/vgdisplay.c
@@ -19,7 +19,9 @@ static int vgdisplay_single(struct cmd_context *cmd, const char *vg_name,
struct volume_group *vg,
void *handle __attribute__((unused)))
{
- /* FIXME Do the active check here if activevolumegroups_ARG ? */
+ if (arg_count(cmd, activevolumegroups_ARG) && !lvs_in_vg_activated(vg))
+ return ECMD_PROCESSED;
+
vg_check_status(vg, EXPORTED_VG);
if (arg_count(cmd, colon_ARG)) {