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

Function check_ZFS

src/zfs.c:61–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61int check_ZFS(disk_t *disk,partition_t *partition)
62{
63 unsigned char *buffer=(unsigned char*)MALLOC(DEFAULT_SECTOR_SIZE);
64 if(disk->pread(disk, buffer, DEFAULT_SECTOR_SIZE, partition->part_offset+0x2000) != DEFAULT_SECTOR_SIZE)
65 {
66 free(buffer);
67 return 1;
68 }
69 if(test_ZFS(disk, (struct vdev_boot_header*)buffer, partition, 0)!=0)
70 {
71 free(buffer);
72 return 1;
73 }
74 set_ZFS_info((struct vdev_boot_header*)buffer, partition);
75 free(buffer);
76 return 0;
77}
78
79int recover_ZFS(const disk_t *disk, const struct vdev_boot_header *sb,partition_t *partition,const int verbose, const int dump_ind)
80{

Callers 2

check_part_noneFunction · 0.85
check_linuxFunction · 0.85

Calls 3

MALLOCFunction · 0.85
test_ZFSFunction · 0.85
set_ZFS_infoFunction · 0.85

Tested by

no test coverage detected