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

Function check_HPFS

src/hpfs.c:87–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87int check_HPFS(disk_t *disk_car,partition_t *partition,const int verbose)
88{
89 unsigned char *buffer=(unsigned char *)MALLOC(disk_car->sector_size);
90 if((unsigned)disk_car->pread(disk_car, buffer, disk_car->sector_size, partition->part_offset) != disk_car->sector_size)
91 {
92 screen_buffer_add("check_HPFS: Read error\n");
93 log_error("check_HPFS: Read error\n");
94 free(buffer);
95 return 1;
96 }
97 if(test_HPFS(disk_car,(const struct fat_boot_sector *)buffer,partition,verbose,0)!=0)
98 {
99 if(verbose>0)
100 {
101 log_info("\n\ntest_HPFS()\n");
102 log_partition(disk_car,partition);
103 }
104 free(buffer);
105 return 1;
106 }
107 set_HPFS_info(partition);
108 free(buffer);
109 return 0;
110}

Callers 1

check_part_noneFunction · 0.85

Calls 5

MALLOCFunction · 0.85
screen_buffer_addFunction · 0.85
test_HPFSFunction · 0.85
log_partitionFunction · 0.85
set_HPFS_infoFunction · 0.85

Tested by

no test coverage detected