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

Function test_VMFS

src/vmfs.c:44–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44static int test_VMFS(const disk_t *disk, const struct vmfs_volume *sb, const partition_t *partition, const int dump_ind)
45{
46 if(le32(sb->magic)!=0xc001d00d || le32(sb->version)>20)
47 return 1;
48 if(dump_ind!=0)
49 {
50 if(partition!=NULL && disk!=NULL)
51 log_info("\nVMFS magic value at %u/%u/%u\n",
52 offset2cylinder(disk,partition->part_offset),
53 offset2head(disk,partition->part_offset),
54 offset2sector(disk,partition->part_offset));
55 dump_log(sb,DEFAULT_SECTOR_SIZE);
56 }
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);

Callers 2

check_VMFSFunction · 0.85
recover_VMFSFunction · 0.85

Calls 4

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

Tested by

no test coverage detected