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

Function test_HPFS

src/hpfs.c:49–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static int test_HPFS(const disk_t *disk_car, const struct fat_boot_sector *hpfs_header, const partition_t *partition, const int verbose, const int dump_ind)
50{
51 const char*buffer=(const char*)hpfs_header;
52 if(le16(hpfs_header->marker)==0xAA55)
53 {
54 if(memcmp(buffer+3,"IBM",3)==0)
55 { /* D'apres une analyse de OS2 sur systeme FAT...
56 FAT_NAME1=FAT
57 */
58 if(verbose||dump_ind)
59 {
60 log_info("\nHPFS maybe at %u/%u/%u\n",
61 offset2cylinder(disk_car,partition->part_offset),
62 offset2head(disk_car,partition->part_offset),
63 offset2sector(disk_car,partition->part_offset));
64 }
65 if(dump_ind!=0)
66 dump_log(buffer, DEFAULT_SECTOR_SIZE);
67 return 0;
68 }
69 } /* fin marqueur de fin :)) */
70 return 1;
71}
72
73int recover_HPFS(const disk_t *disk_car, const struct fat_boot_sector *hpfs_header, partition_t *partition, const int verbose)
74{

Callers 2

recover_HPFSFunction · 0.85
check_HPFSFunction · 0.85

Calls 4

offset2cylinderFunction · 0.85
offset2headFunction · 0.85
offset2sectorFunction · 0.85
dump_logFunction · 0.85

Tested by

no test coverage detected