MCPcopy Create free account
hub / github.com/cgsecurity/testdisk / menu_disk_cli

Function menu_disk_cli

src/tdiskop.c:55–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54
55static int menu_disk_cli(disk_t *disk_car, const int verbose,int dump_ind, const int saveheader, char **current_cmd)
56{
57 int align=1;
58 int ask_part_order=0;
59 unsigned int expert=0;
60 while(1)
61 {
62 skip_comma_in_command(current_cmd);
63 if(check_command(current_cmd,"analyze",7)==0 || check_command(current_cmd,"analyse",7)==0)
64 {
65 list_part_t *list_part;
66 list_part=interface_analyse(disk_car, verbose, saveheader, current_cmd);
67 interface_recovery(disk_car, list_part, verbose, dump_ind, align, ask_part_order, expert, current_cmd);
68 part_free_list(list_part);
69 }
70 else if(check_command(current_cmd,"geometry,",9)==0)
71 {
72 change_geometry_cli(disk_car, current_cmd);
73 }
74 else if(check_command(current_cmd,"advanced",8)==0)
75 {
76 interface_adv(disk_car, verbose, dump_ind, expert,current_cmd);
77 }
78 else if(check_command(current_cmd,"options,",8)==0)
79 {
80 interface_options(&dump_ind, &align, &expert,current_cmd);
81 }
82 else if(check_command(current_cmd,"delete",6)==0)
83 {
84 write_clean_table(disk_car);
85 }
86 else if(check_command(current_cmd,"mbr_code",8)==0)
87 {
88 write_MBR_code(disk_car);
89 }
90 else
91 {
92 return 0;
93 }
94 }
95}
96
97#ifdef HAVE_NCURSES
98static int menu_disk_ncurses(disk_t *disk, const int verbose,int dump_ind, const int saveheader, char **current_cmd)

Callers 1

menu_diskFunction · 0.85

Calls 10

skip_comma_in_commandFunction · 0.85
check_commandFunction · 0.85
interface_analyseFunction · 0.85
interface_recoveryFunction · 0.85
part_free_listFunction · 0.85
change_geometry_cliFunction · 0.85
interface_advFunction · 0.85
interface_optionsFunction · 0.85
write_clean_tableFunction · 0.85
write_MBR_codeFunction · 0.85

Tested by

no test coverage detected