summaryrefslogtreecommitdiffstats
path: root/src/adv.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-02-02 15:14:59 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2014-02-02 15:14:59 +0100
commit880f9a2d4016c90ed5fdcf297619dfb52a1a72a7 (patch)
treef07cc5345c6bd24b1655b64f309cdeb52065ed2b /src/adv.c
parent5620526c2759ed193fbdac5af37537dfb404da65 (diff)
TestDisk: add 'addpart' in CLI command
Diffstat (limited to 'src/adv.c')
-rw-r--r--src/adv.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/adv.c b/src/adv.c
index c2cbfea..5786047 100644
--- a/src/adv.c
+++ b/src/adv.c
@@ -59,6 +59,7 @@
#include "tntfs.h"
#include "thfs.h"
#include "askloc.h"
+#include "addpart.h"
#include "addpartn.h"
#include "io_redir.h"
@@ -328,6 +329,11 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const
(*current_cmd)+=4;
command='t';
}
+ else if(strncmp(*current_cmd,"addpart",7)==0)
+ {
+ (*current_cmd)+=7;
+ command='a';
+ }
else if(strncmp(*current_cmd,"boot",4)==0)
{
(*current_cmd)+=4;
@@ -387,7 +393,10 @@ void interface_adv(disk_t *disk_car, const int verbose,const int dump_ind, const
case 'A':
if(disk_car->arch!=&arch_none)
{
- list_part=add_partition_ncurses(disk_car, list_part);
+ if(*current_cmd!=NULL)
+ list_part=add_partition_cli(disk_car, list_part, current_cmd);
+ else
+ list_part=add_partition_ncurses(disk_car, list_part);
current_element=list_part;
rewrite=1;
}