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

Function test_ZFS

src/zfs.c:45–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45static int test_ZFS(const disk_t *disk, const struct vdev_boot_header *sb, const partition_t *partition, const int dump_ind)
46{
47 if(le64(sb->vb_magic)!=VDEV_BOOT_MAGIC)
48 return 1;
49 if(dump_ind!=0)
50 {
51 if(partition!=NULL && disk!=NULL)
52 log_info("\nZFS magic value at %u/%u/%u\n",
53 offset2cylinder(disk,partition->part_offset),
54 offset2head(disk,partition->part_offset),
55 offset2sector(disk,partition->part_offset));
56 dump_log(sb,DEFAULT_SECTOR_SIZE);
57 }
58 return 0;
59}
60
61int check_ZFS(disk_t *disk,partition_t *partition)
62{

Callers 2

check_ZFSFunction · 0.85
recover_ZFSFunction · 0.85

Calls 4

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

Tested by

no test coverage detected