From f80cbe8c33f7659e3a85f14ef096076d716ce955 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 21 May 2010 12:19:22 +0000 Subject: [PATCH] Return ECMD_FAILED for break in process_each_lv() and process_each_segment_in_lv() --- WHATS_NEW | 1 + tools/toollib.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 98bfd7cb3..303fa5f60 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.67 - =============================== + Return ECMD_FAILED for break in process_each_lv() and process_each_segment_in_lv(). Version 2.02.66 - 20th May 2010 =============================== diff --git a/tools/toollib.c b/tools/toollib.c index 735f3b07e..5f5cbb33f 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -329,8 +329,9 @@ int process_each_lv(struct cmd_context *cmd, int argc, char **argv, unlock_and_release_vg(cmd, vg, vgname); if (ret > ret_max) ret_max = ret; + /* FIXME: logic for breaking command is not consistent */ if (sigint_caught()) - break; + return ECMD_FAILED; } return ret_max; @@ -408,8 +409,9 @@ int process_each_segment_in_lv(struct cmd_context *cmd, ret = process_single_seg(cmd, seg, handle); if (ret > ret_max) ret_max = ret; + /* FIXME: logic for breaking command is not consistent */ if (sigint_caught()) - break; + return ECMD_FAILED; } return ret_max; -- 2.43.5