summaryrefslogtreecommitdiffstats
path: root/tools/lvchange.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2006-10-24 15:30:33 +0000
committerAlasdair Kergon <agk@redhat.com>2006-10-24 15:30:33 +0000
commit7dd05dd468cb09aa41f0ebd3ba57c3f86a14b63c (patch)
tree9f40a2776adfd103aeea344778cded541c134af5 /tools/lvchange.c
parent04e023be19ad1b4fdb8308fe3a59c234c480755e (diff)
downloadlvm2-7dd05dd468cb09aa41f0ebd3ba57c3f86a14b63c.tar.gz
lvm2-7dd05dd468cb09aa41f0ebd3ba57c3f86a14b63c.tar.xz
lvm2-7dd05dd468cb09aa41f0ebd3ba57c3f86a14b63c.zip
fix forcesync local active detection
Diffstat (limited to 'tools/lvchange.c')
-rw-r--r--tools/lvchange.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/lvchange.c b/tools/lvchange.c
index c7cb2244..eaf5cfb2 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -205,17 +205,18 @@ static int lvchange_forcesync(struct cmd_context *cmd,
return ECMD_FAILED;
}
- if (info.exists && !arg_count(cmd, yes_ARG)) {
- if (yes_no_prompt("Do you really want to deactivate "
+ if (info.exists) {
+ if (!arg_count(cmd, yes_ARG) &&
+ yes_no_prompt("Do you really want to deactivate "
"logical volume %s to resync it? [y/n]: ",
lv->name) == 'n') {
log_print("Logical volume \"%s\" not resynced",
lv->name);
return ECMD_FAILED;
}
- }
- active = 1;
+ active = 1;
+ }
}
if ((lv->vg->status & CLUSTERED) && !activate_lv_excl(cmd, lv)) {