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

Function check_part_mac

src/partmac.c:410–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408}
409
410static int check_part_mac(disk_t *disk_car,const int verbose,partition_t *partition, const int saveheader)
411{
412 int ret=0;
413 switch(partition->part_type_mac)
414 {
415 case PMAC_DRIVER43:
416 case PMAC_DRIVERATA:
417 case PMAC_DRIVERIO:
418 case PMAC_FREE:
419 case PMAC_FWDRIVER:
420 case PMAC_SWAP:
421 case PMAC_MAP:
422 case PMAC_PATCHES:
423 case PMAC_UNK:
424 case PMAC_NewWorld:
425 case PMAC_DRIVER:
426 case PMAC_MFS:
427 case PMAC_BEOS:
428 case PMAC_PRODOS:
429 break;
430 case PMAC_LINUX:
431 ret=check_linux(disk_car, partition, verbose);
432 if(ret!=0)
433 screen_buffer_add("No ext2, JFS, Reiser, cramfs or XFS marker\n");
434 break;
435 case PMAC_HFS:
436 ret=check_HFSP(disk_car,partition,verbose);
437 if(ret!=0)
438 {
439 ret=check_HFS(disk_car,partition,verbose);
440 }
441 break;
442 case PMAC_FAT32:
443 ret=check_FAT(disk_car, partition, verbose);
444 break;
445 default:
446 if(verbose>0)
447 {
448 log_info("check_part_mac %u type %02X: no test\n",partition->order,partition->part_type_mac);
449 }
450 break;
451 }
452 if(ret!=0)
453 {
454 log_error("check_part_mac failed for partition type %02X\n", partition->part_type_mac);
455 aff_part_buffer(AFF_PART_ORDER|AFF_PART_STATUS,disk_car,partition);
456 if(saveheader>0)
457 {
458 save_header(disk_car,partition,verbose);
459 }
460 }
461 return ret;
462}
463
464static const char *get_partition_typename_mac_aux(const unsigned int part_type_mac)
465{

Callers 1

read_part_macFunction · 0.85

Calls 7

check_linuxFunction · 0.85
screen_buffer_addFunction · 0.85
check_HFSPFunction · 0.85
check_HFSFunction · 0.85
check_FATFunction · 0.85
aff_part_bufferFunction · 0.85
save_headerFunction · 0.85

Tested by

no test coverage detected