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

Function test_APFS

src/apfs_common.c:78–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78int test_APFS(const nx_superblock_t *sb, const partition_t *partition)
79{
80 if(le32(sb->nx_magic)!=0x4253584e)
81 return 1;
82 if((uint64_t)le32(sb->nx_xp_desc_blocks) + le32(sb->nx_xp_data_blocks) > le64(sb->nx_block_count))
83 return 2;
84 if(le32(sb->nx_block_size) < NX_MINIMUM_BLOCK_SIZE ||
85 le32(sb->nx_block_size) > NX_MAXIMUM_BLOCK_SIZE)
86 return 3;
87 if(VerifyBlock(sb, 4096) != 0)
88 return 4;
89 return 0;
90}

Callers 2

check_APFSFunction · 0.85
recover_APFSFunction · 0.85

Calls 1

VerifyBlockFunction · 0.85

Tested by

no test coverage detected