From f3993cac4a718b8c02815ca0e8cf6841082b7113 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Mon, 6 Jan 2003 21:06:43 +0000 Subject: [PATCH] Correct error message for non-snapshot activation failure. --- tools/lvcreate.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/lvcreate.c b/tools/lvcreate.c index 06c129b13..450477d30 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -439,9 +439,12 @@ static int _lvcreate(struct cmd_context *cmd, struct lvcreate_params *lp) return 0; if (!lock_vol(cmd, lv->lvid.s, LCK_LV_ACTIVATE)) { - /* FIXME Remove the failed lv we just added */ - log_error("Aborting. Failed to wipe snapshot " - "exception store. Remove new LV and retry."); + if (lp->snapshot) + /* FIXME Remove the failed lv we just added */ + log_error("Aborting. Failed to wipe snapshot " + "exception store. Remove new LV and retry."); + else + log_error("Failed to activate new LV."); return 0; } -- 2.43.5