summaryrefslogtreecommitdiff
path: root/tools/lvrename.c
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2014-09-15 21:33:53 +0100
committerAlasdair G Kergon <agk@redhat.com>2014-09-15 21:33:53 +0100
commit2360ce3551f2989f1cc2af06c3d3a0a0f1429bce (patch)
treea151ec9c456d6cbcd629ea7bae73bf43bade492f /tools/lvrename.c
parent10a448eb2fdc795d144f13ba4a7d83351eb8c9df (diff)
downloadlvm2-2360ce3551f2989f1cc2af06c3d3a0a0f1429bce.tar.gz
cleanup: Use lv_is_ macros.
Use lv_is_* macros throughout the code base, introducing lv_is_pvmove, lv_is_locked, lv_is_converting and lv_is_merging. lv_is_mirror_type no longer includes pvmove.
Diffstat (limited to 'tools/lvrename.c')
-rw-r--r--tools/lvrename.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lvrename.c b/tools/lvrename.c
index 3bf479384..eeff76da2 100644
--- a/tools/lvrename.c
+++ b/tools/lvrename.c
@@ -111,9 +111,9 @@ int lvrename(struct cmd_context *cmd, int argc, char **argv)
goto bad;
}
- if (lvl->lv->status & (RAID_IMAGE | RAID_META)) {
+ if (lv_is_raid_image(lvl->lv) || lv_is_raid_metadata(lvl->lv)) {
log_error("Cannot rename a RAID %s directly",
- (lvl->lv->status & RAID_IMAGE) ? "image" :
+ lv_is_raid_image(lvl->lv) ? "image" :
"metadata area");
goto bad;
}