Skip to contentSkip to conversation

master - lvchange: support --yes option for --persistent

PATCH Zdenek Kabelac 1 participant 1 message Oct 19, 2012

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5f5a5d1f53d4dac462f447c0db692229f4a501b3
Commit:        5f5a5d1f53d4dac462f447c0db692229f4a501b3
Parent:        bc7d3b74f10bae4fd5931346f954601b89ddeee9
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Oct 19 14:16:15 2012 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Oct 19 15:33:46 2012 +0200

lvchange: support --yes option for --persistent

Support using command: lvchange --yes --persistent to skip y|n prompt.

---
 WHATS_NEW        |    1 +
 tools/lvchange.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
WHATS_NEW +1 -0
index ad0756a..7d3995b 100644
@@ -1,5 +1,6 @@
 Version 2.02.99 - 
 ===================================
+  Support use of option --yes for lvchange --persistent.
   Fix memory leak on error path for pvcreate with invalid uuid.
   Use lv_is_active() instead of lv_info() call.
   Cleanup some log_error message and use log_warn instead.
tools/lvchange.c +1 -0
index 842b2da..8eabbbb 100644
@@ -660,6 +660,7 @@ static int lvchange_persistent(struct cmd_context *cmd,
 			return 0;
 
 		if (active && !arg_count(cmd, force_ARG) &&
+		    !arg_count(cmd, yes_ARG) &&
 		    yes_no_prompt("Logical volume %s will be "
 				  "deactivated temporarily. "
 				  "Continue? [y/n]: ", lv->name) == 'n') {