1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

lvreduce: support --yes

Missed support for --yes with 'lvreduce' to answer 'y' to prompt.
This commit is contained in:
Zdenek Kabelac 2021-04-06 12:26:42 +02:00
parent f1d3648dc7
commit 287565fd5d

View File

@ -4970,7 +4970,7 @@ static int _request_confirmation(const struct logical_volume *lv,
log_warn("THIS MAY DESTROY YOUR DATA (filesystem etc.)");
if (!lp->force) {
if (!lp->force && !lp->yes) {
if (yes_no_prompt("Do you really want to reduce %s? [y/n]: ",
display_lvname(lv)) == 'n') {
log_error("Logical volume %s NOT reduced.",