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

Function ask_structure_cli

src/intrface.c:80–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80static list_part_t *ask_structure_cli(disk_t *disk_car,list_part_t *list_part, const int verbose, char **current_cmd)
81{
82 const list_part_t *pos=list_part;
83 skip_comma_in_command(current_cmd);
84 if(check_command(current_cmd,"list",4)==0)
85 {
86 if(pos!=NULL)
87 {
88 const partition_t *partition=pos->part;
89 if(partition->sb_offset==0 || partition->sb_size==0)
90 dir_partition(disk_car, partition, verbose, 0, current_cmd);
91 else
92 {
93 io_redir_add_redir(disk_car,
94 partition->part_offset+partition->sborg_offset,
95 partition->sb_size,
96 partition->part_offset+partition->sb_offset,
97 NULL);
98 dir_partition(disk_car, partition, verbose, 0, current_cmd);
99 io_redir_del_redir(disk_car, partition->part_offset+partition->sborg_offset);
100 }
101 }
102 }
103 return list_part;
104}
105
106#ifdef HAVE_NCURSES
107#define INTER_STRUCTURE (LINES-12)

Callers 1

ask_structureFunction · 0.85

Calls 5

skip_comma_in_commandFunction · 0.85
check_commandFunction · 0.85
dir_partitionFunction · 0.85
io_redir_add_redirFunction · 0.85
io_redir_del_redirFunction · 0.85

Tested by

no test coverage detected