summaryrefslogtreecommitdiffstats
path: root/src/phcli.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2019-12-10 20:42:59 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2019-12-10 20:42:59 +0100
commit79f10a249708792dbb27087495c3a466f2bf8dbe (patch)
tree4650364fee9d050783be12c44076b2d12c44392e /src/phcli.c
parent6f24cf45f6f93f52b6bbb3ddb63118dd4a3d93cd (diff)
PhotoRec: Ctrl-C should break from more locations (see 6f24cf45f6f93f52b6bbb3ddb63118dd4a3d93cd)
Diffstat (limited to 'src/phcli.c')
-rw-r--r--src/phcli.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/phcli.c b/src/phcli.c
index c08c05c..952d13d 100644
--- a/src/phcli.c
+++ b/src/phcli.c
@@ -41,6 +41,7 @@
#include "poptions.h"
#include "phcli.h"
+extern int need_to_stop;
typedef enum { INIT_SPACE_WHOLE, INIT_SPACE_PREINIT, INIT_SPACE_EXT2_GROUP, INIT_SPACE_EXT2_INODE } init_mode_t;
static int spacerange_cmp(const struct td_list_head *a, const struct td_list_head *b)
@@ -136,6 +137,8 @@ int menu_photorec_cli(list_part_t *list_part, struct ph_param *params, struct ph
skip_comma_in_command(&params->cmd_run);
if(params->cmd_run[0]=='\0')
return 0;
+ if(need_to_stop!=0)
+ return 0;
if(check_command(&params->cmd_run,"search",6)==0)
{
if(mode_init_space==INIT_SPACE_EXT2_GROUP)