From d6b1de30fe3f4ca1704b37215f61a32fb2a6b1b0 Mon Sep 17 00:00:00 2001 From: Dave Wysochanski Date: Tue, 19 Jun 2007 04:36:12 +0000 Subject: Convert vg->status checks to use vg_check_status function.\nRename status_flags to status in vg_check_status. --- tools/vgremove.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tools/vgremove.c') diff --git a/tools/vgremove.c b/tools/vgremove.c index 142ab962..419e6e3c 100644 --- a/tools/vgremove.c +++ b/tools/vgremove.c @@ -23,7 +23,7 @@ static int vgremove_single(struct cmd_context *cmd, const char *vg_name, struct pv_list *pvl; int ret = ECMD_PROCESSED; - if (!vg || !consistent || (vg->status & PARTIAL_VG)) { + if (!vg || !consistent || (vg_status(vg) & PARTIAL_VG)) { log_error("Volume group \"%s\" not found or inconsistent.", vg_name); log_error("Consider vgreduce --removemissing if metadata " @@ -31,10 +31,8 @@ static int vgremove_single(struct cmd_context *cmd, const char *vg_name, return ECMD_FAILED; } - if (vg->status & EXPORTED_VG) { - log_error("Volume group \"%s\" is exported", vg->name); + if (!vg_check_status(vg, EXPORTED_VG)) return ECMD_FAILED; - } if (vg->lv_count) { log_error("Volume group \"%s\" still contains %d " -- cgit