summaryrefslogtreecommitdiff
path: root/tools/vgchange.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2018-11-27 14:38:39 -0600
committerDavid Teigland <teigland@redhat.com>2018-11-27 14:40:24 -0600
commitea9b2c2122d76b7fbdb0fb78e854acdf0f80ec87 (patch)
tree6293a927e1281b01f1fcf1cf020047ffe43eb018 /tools/vgchange.c
parentd8284beb23f7a81b27e5acb0ecb90d76809df736 (diff)
downloadlvm2-ea9b2c2122d76b7fbdb0fb78e854acdf0f80ec87.tar.gz
lvmlockd: vgchange locktype with yes option
for auto response to yes/no prompt.
Diffstat (limited to 'tools/vgchange.c')
-rw-r--r--tools/vgchange.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/vgchange.c b/tools/vgchange.c
index e8e302ce4..0f9241cb1 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -1045,7 +1045,8 @@ int vgchange_locktype_cmd(struct cmd_context *cmd, int argc, char **argv)
return 0;
}
- if (yes_no_prompt("Forcibly change VG lock type to none? [y/n]: ") == 'n') {
+ if (!arg_is_set(cmd, yes_ARG) &&
+ yes_no_prompt("Forcibly change VG lock type to none? [y/n]: ") == 'n') {
log_error("VG lock type not changed.");
return 0;
}