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

Function use_backup

src/godmode.c:1302–1334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1300}
1301
1302static int use_backup(disk_t *disk_car, const list_part_t *list_part, const int verbose,const int dump_ind, const unsigned int expert, char**current_cmd)
1303{
1304 const list_part_t *element;
1305 if(verbose>1)
1306 {
1307 log_trace("use_backup\n");
1308 }
1309 for(element=list_part;element!=NULL;element=element->next)
1310 {
1311 if(element->part->sb_offset!=0)
1312 {
1313 switch(element->part->upart_type)
1314 {
1315 case UP_FAT32:
1316 fat32_boot_sector(disk_car, element->part, verbose, dump_ind, expert,current_cmd);
1317 break;
1318 case UP_NTFS:
1319 ntfs_boot_sector(disk_car, element->part, verbose, expert, current_cmd);
1320 break;
1321 case UP_HFS:
1322 case UP_HFSP:
1323 case UP_HFSX:
1324 HFS_HFSP_boot_sector(disk_car, element->part, verbose, current_cmd);
1325 break;
1326 default:
1327 log_warning("Need to fix\n");
1328 log_partition(disk_car,element->part);
1329 break;
1330 }
1331 }
1332 }
1333 return 0;
1334}
1335
1336static void warning_geometry(const list_part_t *list_part, disk_t *disk, const int verbose, char **current_cmd)
1337{

Callers 1

Calls 4

fat32_boot_sectorFunction · 0.85
HFS_HFSP_boot_sectorFunction · 0.85
log_partitionFunction · 0.85
ntfs_boot_sectorClass · 0.70

Tested by

no test coverage detected