| 44 | } |
| 45 | |
| 46 | int check_APFS(disk_t *disk_car, partition_t *partition) |
| 47 | { |
| 48 | unsigned char *buffer=(unsigned char*)MALLOC(APFS_SUPERBLOCK_SIZE); |
| 49 | const nx_superblock_t* sb=(const nx_superblock_t *)buffer; |
| 50 | if(disk_car->pread(disk_car, buffer, APFS_SUPERBLOCK_SIZE, partition->part_offset) != APFS_SUPERBLOCK_SIZE) |
| 51 | { |
| 52 | free(buffer); |
| 53 | return 1; |
| 54 | } |
| 55 | if(test_APFS(sb, partition)!=0) |
| 56 | { |
| 57 | free(buffer); |
| 58 | return 1; |
| 59 | } |
| 60 | set_APFS_info(sb, partition); |
| 61 | free(buffer); |
| 62 | return 0; |
| 63 | } |
| 64 | |
| 65 | int recover_APFS(const disk_t *disk, const nx_superblock_t *sb, partition_t *partition, const int verbose, const int dump_ind) |
| 66 | { |
no test coverage detected