summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2006-04-07 17:41:56 +0000
committerAlasdair Kergon <agk@redhat.com>2006-04-07 17:41:56 +0000
commitace652e673e8f97cd5f2c24925a6e0d1dd9b4c15 (patch)
tree707ff1c71081228302cb15a12d4453f20fd8e035 /tools
parentd79e9d0d61a092d40dcb2ca03540c87c5b457485 (diff)
downloadlvm2-ace652e673e8f97cd5f2c24925a6e0d1dd9b4c15.tar.gz
lvm2-ace652e673e8f97cd5f2c24925a6e0d1dd9b4c15.tar.xz
lvm2-ace652e673e8f97cd5f2c24925a6e0d1dd9b4c15.zip
lv_is_visible()
Diffstat (limited to 'tools')
-rw-r--r--tools/lvdisplay.c3
-rw-r--r--tools/lvscan.c4
-rw-r--r--tools/reporter.c8
3 files changed, 4 insertions, 11 deletions
diff --git a/tools/lvdisplay.c b/tools/lvdisplay.c
index 0dd2a140..165f8515 100644
--- a/tools/lvdisplay.c
+++ b/tools/lvdisplay.c
@@ -18,8 +18,7 @@
static int _lvdisplay_single(struct cmd_context *cmd, struct logical_volume *lv,
void *handle)
{
- if (!arg_count(cmd, all_ARG) && !(lv->status & VISIBLE_LV) &&
- !(lv_is_cow(lv)))
+ if (!arg_count(cmd, all_ARG) && !lv_is_visible(lv))
return ECMD_PROCESSED;
if (arg_count(cmd, colon_ARG))
diff --git a/tools/lvscan.c b/tools/lvscan.c
index 1bd467d3..2faeac7d 100644
--- a/tools/lvscan.c
+++ b/tools/lvscan.c
@@ -27,9 +27,7 @@ static int lvscan_single(struct cmd_context *cmd, struct logical_volume *lv,
const char *active_str, *snapshot_str;
- /* FIXME Avoid snapshot special-case */
- if (!arg_count(cmd, all_ARG) && !(lv->status & VISIBLE_LV) &&
- !(lv_is_cow(lv)))
+ if (!arg_count(cmd, all_ARG) && !lv_is_visible(lv))
return ECMD_PROCESSED;
inkernel = lv_info(cmd, lv, &info, 1) && info.exists;
diff --git a/tools/reporter.c b/tools/reporter.c
index 5f3775e9..f478c06e 100644
--- a/tools/reporter.c
+++ b/tools/reporter.c
@@ -35,9 +35,7 @@ static int _vgs_single(struct cmd_context *cmd, const char *vg_name,
static int _lvs_single(struct cmd_context *cmd, struct logical_volume *lv,
void *handle)
{
- /* FIXME Avoid snapshot special-case */
- if (!arg_count(cmd, all_ARG) && !(lv->status & VISIBLE_LV) &&
- !(lv_is_cow(lv)))
+ if (!arg_count(cmd, all_ARG) && !lv_is_visible(lv))
return ECMD_PROCESSED;
if (!report_object(handle, lv->vg, lv, NULL, NULL, NULL))
@@ -83,9 +81,7 @@ static int _pvsegs_sub_single(struct cmd_context *cmd, struct volume_group *vg,
static int _lvsegs_single(struct cmd_context *cmd, struct logical_volume *lv,
void *handle)
{
- /* FIXME Avoid snapshot special-case */
- if (!arg_count(cmd, all_ARG) && !(lv->status & VISIBLE_LV) &&
- !(lv_is_cow(lv)))
+ if (!arg_count(cmd, all_ARG) && !lv_is_visible(lv))
return ECMD_PROCESSED;
return process_each_segment_in_lv(cmd, lv, handle, _segs_single);