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

Function check_VMFS

src/vmfs.c:59–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 return 0;
58}
59int check_VMFS(disk_t *disk,partition_t *partition)
60{
61 unsigned char *buffer=(unsigned char*)MALLOC(2*DEFAULT_SECTOR_SIZE);
62 if(disk->pread(disk, buffer, 2*DEFAULT_SECTOR_SIZE, partition->part_offset+0x100000) != DEFAULT_SECTOR_SIZE)
63 {
64 free(buffer);
65 return 1;
66 }
67 if(test_VMFS(disk, (struct vmfs_volume*)buffer, partition, 0)!=0)
68 {
69 free(buffer);
70 return 1;
71 }
72 set_VMFS_info((struct vmfs_volume*)buffer, partition);
73 free(buffer);
74 return 0;
75}
76
77int recover_VMFS(const disk_t *disk, const struct vmfs_volume *sb, partition_t *partition, const int verbose, const int dump_ind)
78{

Callers 1

check_part_noneFunction · 0.85

Calls 3

MALLOCFunction · 0.85
test_VMFSFunction · 0.85
set_VMFS_infoFunction · 0.85

Tested by

no test coverage detected