diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2013-12-03 14:41:25 +0100 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2013-12-03 14:43:00 +0100 |
commit | 6232cac86cea332efb1e538fc8cd1922dc35bd01 (patch) | |
tree | c7e13ccfda97df19a49d1849880916ccd7e6fd96 /tools/vgdisplay.c | |
parent | c35394959758ec17389529f95a33bf7f5b15c56b (diff) | |
download | lvm2-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.c | 4 |
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)) { |