summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2016-01-21 13:19:27 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2016-01-21 13:29:07 +0100
commit347575df1d801425b1f1f8ed7106ffe74ce6c8c7 (patch)
tree77056b92475d382003647a618162237d63d6b056
parentc701d9cc8c9c559622c8ce27aa9c7f28169b4dfc (diff)
downloadlvm2-347575df1d801425b1f1f8ed7106ffe74ce6c8c7.tar.gz
toollib: restore command break support
Fix regression caused by c9f021de0b4d2c873ef5b97d17c602d0380359fd. This commit actually transfered real-action (e.g. device removal) into the next loop which has however missed to check for break. So add check for break also there.
-rw-r--r--WHATS_NEW1
-rw-r--r--tools/toollib.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/WHATS_NEW b/WHATS_NEW
index fe1da469f..6342041a8 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.141 -
====================================
+ Restore support for command breaking in process_each_lv_in_vg() (2.02.118).
Use correct mempool when process_each_lv_in_vg() (2.02.118).
Fix lvm.8 man to show again prohibited suffixes.
Fix configure to set proper use_blkid_wiping if autodetected as disabled.
diff --git a/tools/toollib.c b/tools/toollib.c
index e681afe9a..c89d8e5c5 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -2416,6 +2416,10 @@ int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg,
}
dm_list_iterate_items(lvl, &final_lvs) {
+ if (sigint_caught()) {
+ ret_max = ECMD_FAILED;
+ goto_out;
+ }
/*
* FIXME: Once we have index over vg->removed_lvs, check directly
* LV presence there and remove LV_REMOVE flag/lv_is_removed fn