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

Function interface_list

src/intrface.c:54–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52extern const arch_fnct_t arch_none;
53
54void interface_list(disk_t *disk, const int verbose, const int saveheader, const int backup)
55{
56 list_part_t *list_part;
57 list_part_t *parts;
58 log_info("\nAnalyse ");
59 log_info("%s\n", disk->description(disk));
60 printf("%s\n", disk->description(disk));
61 printf(msg_PART_HEADER_LONG);
62 list_part=disk->arch->read_part(disk,verbose,saveheader);
63 /*@ assert valid_list_part(list_part); */
64 for(parts=list_part; parts!=NULL; parts=parts->next)
65 {
66 const char *msg;
67 const partition_t *partition=parts->part;
68 msg=aff_part_aux(AFF_PART_ORDER|AFF_PART_STATUS, disk, partition);
69 printf("%s\n", msg);
70 if(partition->info[0]!='\0')
71 printf(" %s\n", partition->info);
72 }
73 if(backup>0)
74 {
75 partition_save(disk, list_part, verbose);
76 }
77 part_free_list(list_part);
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{

Callers 2

display_disk_listFunction · 0.85
mainFunction · 0.85

Calls 3

aff_part_auxFunction · 0.85
partition_saveFunction · 0.85
part_free_listFunction · 0.85

Tested by 2

display_disk_listFunction · 0.68
mainFunction · 0.68