From 5f5a5d1f53d4dac462f447c0db692229f4a501b3 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 19 Oct 2012 14:16:15 +0200 Subject: [PATCH] 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(+) diff --git a/WHATS_NEW b/WHATS_NEW index ad0756a1d..7d3995b98 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -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. diff --git a/tools/lvchange.c b/tools/lvchange.c index 842b2da54..8eabbbb4e 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -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') {