[lvm-devel] master - lvmlockd: vgchange locktype with yes option

David Teigland teigland at sourceware.org
Tue Nov 27 20:40:52 UTC 2018


Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ea9b2c2122d76b7fbdb0fb78e854acdf0f80ec87
Commit:        ea9b2c2122d76b7fbdb0fb78e854acdf0f80ec87
Parent:        d8284beb23f7a81b27e5acb0ecb90d76809df736
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Tue Nov 27 14:38:39 2018 -0600
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Tue Nov 27 14:40:24 2018 -0600

lvmlockd: vgchange locktype with yes option

for auto response to yes/no prompt.
---
 tools/vgchange.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/vgchange.c b/tools/vgchange.c
index e8e302c..0f9241c 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;
 		}




More information about the lvm-devel mailing list