summaryrefslogtreecommitdiffstats
path: root/src/intrf.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2008-02-08 09:02:55 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2008-02-08 09:02:55 +0100
commit687062e9dbc39621bec0125f2d97eeb96f40e0f5 (patch)
tree931e3c5d3f0cb1da092a32ce55bf87e7adced091 /src/intrf.c
parent48f986a963fc4aa8856f74a148551d769576782a (diff)
Mix interactive and cli mode in PhotoRec
Diffstat (limited to 'src/intrf.c')
-rw-r--r--src/intrf.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/intrf.c b/src/intrf.c
index 474a3e1..d8ee938 100644
--- a/src/intrf.c
+++ b/src/intrf.c
@@ -1948,12 +1948,14 @@ int intrf_no_disk(const char *prog_name)
int interface_partition_type(disk_t *disk_car, const int verbose, char**current_cmd)
{
const arch_fnct_t *arch_list[]={&arch_i386, &arch_gpt, &arch_none, &arch_sun, &arch_mac, NULL};
+ int ask_user=1;
if(*current_cmd!=NULL)
{
int keep_asking;
do
{
int i;
+ ask_user=0;
keep_asking=0;
while(*current_cmd[0]==',')
(*current_cmd)++;
@@ -1964,9 +1966,14 @@ int interface_partition_type(disk_t *disk_car, const int verbose, char**current_
disk_car->arch=arch_list[i];
keep_asking=1;
}
+ if(strncmp(*current_cmd, "ask_type", 8)==0)
+ {
+ (*current_cmd)+=8;
+ ask_user=1;
+ }
} while(keep_asking>0);
}
- else
+ if(ask_user>0)
{
#ifdef HAVE_NCURSES
if(interface_partition_type_ncurses(disk_car))