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

Function interface_options

src/toptions.c:83–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81#endif
82
83void interface_options(int *dump_ind, int *align, unsigned int *expert, char**current_cmd)
84{
85 assert(current_cmd!=NULL);
86 if(*current_cmd!=NULL)
87 {
88 int keep_asking=1;
89 do
90 {
91 skip_comma_in_command(current_cmd);
92 if(check_command(current_cmd,"dump",4)==0)
93 {
94 *dump_ind=1;
95 }
96 else if(check_command(current_cmd,"nodump",6)==0)
97 {
98 *dump_ind=0;
99 }
100 else if(check_command(current_cmd,"align",5)==0)
101 {
102 *align=1;
103 }
104 else if(check_command(current_cmd,"noalign",7)==0)
105 {
106 *align=0;
107 }
108 else if(check_command(current_cmd,"expert",6)==0)
109 {
110 *expert=1;
111 }
112 else if(check_command(current_cmd,"noexpert",8)==0)
113 {
114 *expert=0;
115 }
116 else
117 keep_asking=0;
118 } while(keep_asking>0);
119 }
120 else
121 {
122#ifdef HAVE_NCURSES
123 interface_options_ncurses(dump_ind, align, expert);
124#endif
125 }
126 /* write new options to log file */
127 log_info("New options :\n");
128 log_info(" Dump : %s\n", (*dump_ind?"Yes":"No"));
129 log_info(" Align partition: %s\n", (*align?"Yes":"No"));
130 log_info(" Expert mode : %s\n", (*expert?"Yes":"No"));
131}

Callers 2

menu_disk_cliFunction · 0.85
menu_disk_ncursesFunction · 0.85

Calls 3

skip_comma_in_commandFunction · 0.85
check_commandFunction · 0.85

Tested by

no test coverage detected