summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2008-12-04 15:54:26 +0000
committerPeter Rajnoha <prajnoha@redhat.com>2008-12-04 15:54:26 +0000
commitb47952641ae481341886969e9986427ea707cea7 (patch)
treec7e2e5eadab4fa8d0922a8a99167aaea0c38fdf3 /tools
parent9d9589d173ae67329e419a99b8155f44ca7525c8 (diff)
downloadlvm2-b47952641ae481341886969e9986427ea707cea7.tar.gz
lvm2-b47952641ae481341886969e9986427ea707cea7.tar.xz
lvm2-b47952641ae481341886969e9986427ea707cea7.zip
Added displayable_lvs_in_vg and lv_is_displayable functions to deal with
the counts of visible LVs from user's perspective consistently throughout the code.
Diffstat (limited to 'tools')
-rw-r--r--tools/lvchange.c2
-rw-r--r--tools/lvdisplay.c2
-rw-r--r--tools/lvscan.c2
-rw-r--r--tools/reporter.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/tools/lvchange.c b/tools/lvchange.c
index 4016c8f5..3c2fa19a 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -590,7 +590,7 @@ static int lvchange_single(struct cmd_context *cmd, struct logical_volume *lv,
return ECMD_FAILED;
}
- if (!(lv->status & VISIBLE_LV)) {
+ if (!(lv_is_displayable(lv))) {
log_error("Unable to change internal LV %s directly",
lv->name);
return ECMD_FAILED;
diff --git a/tools/lvdisplay.c b/tools/lvdisplay.c
index 16e7052f..5263e0d1 100644
--- a/tools/lvdisplay.c
+++ b/tools/lvdisplay.c
@@ -18,7 +18,7 @@
static int _lvdisplay_single(struct cmd_context *cmd, struct logical_volume *lv,
void *handle)
{
- if (!arg_count(cmd, all_ARG) && !lv_is_visible(lv))
+ if (!arg_count(cmd, all_ARG) && !lv_is_displayable(lv))
return ECMD_PROCESSED;
if (arg_count(cmd, colon_ARG))
diff --git a/tools/lvscan.c b/tools/lvscan.c
index a286fe17..1186b3bc 100644
--- a/tools/lvscan.c
+++ b/tools/lvscan.c
@@ -27,7 +27,7 @@ static int lvscan_single(struct cmd_context *cmd, struct logical_volume *lv,
const char *active_str, *snapshot_str;
- if (!arg_count(cmd, all_ARG) && !lv_is_visible(lv))
+ if (!arg_count(cmd, all_ARG) && !lv_is_displayable(lv))
return ECMD_PROCESSED;
inkernel = lv_info(cmd, lv, &info, 1, 0) && info.exists;
diff --git a/tools/reporter.c b/tools/reporter.c
index e95ed5e8..d1907438 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -36,7 +36,7 @@ static int _vgs_single(struct cmd_context *cmd __attribute((unused)),
static int _lvs_single(struct cmd_context *cmd, struct logical_volume *lv,
void *handle)
{
- if (!arg_count(cmd, all_ARG) && !lv_is_visible(lv))
+ if (!arg_count(cmd, all_ARG) && !lv_is_displayable(lv))
return ECMD_PROCESSED;
if (!report_object(handle, lv->vg, lv, NULL, NULL, NULL))
@@ -102,7 +102,7 @@ static int _pvsegs_sub_single(struct cmd_context *cmd __attribute((unused)),
static int _lvsegs_single(struct cmd_context *cmd, struct logical_volume *lv,
void *handle)
{
- if (!arg_count(cmd, all_ARG) && !lv_is_visible(lv))
+ if (!arg_count(cmd, all_ARG) && !lv_is_displayable(lv))
return ECMD_PROCESSED;
return process_each_segment_in_lv(cmd, lv, handle, _segs_single);