| 76 | } |
| 77 | |
| 78 | int 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 | } |
no test coverage detected