diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2016-01-21 13:19:27 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2016-01-21 13:29:07 +0100 |
commit | 347575df1d801425b1f1f8ed7106ffe74ce6c8c7 (patch) | |
tree | 77056b92475d382003647a618162237d63d6b056 | |
parent | c701d9cc8c9c559622c8ce27aa9c7f28169b4dfc (diff) | |
download | lvm2-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_NEW | 1 | ||||
-rw-r--r-- | tools/toollib.c | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -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 |