| 64 | } |
| 65 | |
| 66 | int check_LUKS(disk_t *disk_car,partition_t *partition) |
| 67 | { |
| 68 | unsigned char *buffer=(unsigned char*)MALLOC(DEFAULT_SECTOR_SIZE); |
| 69 | if(disk_car->pread(disk_car, buffer, DEFAULT_SECTOR_SIZE, partition->part_offset) != DEFAULT_SECTOR_SIZE) |
| 70 | { |
| 71 | free(buffer); |
| 72 | return 1; |
| 73 | } |
| 74 | if(test_LUKS(disk_car, (struct luks_phdr*)buffer, partition, 0)!=0) |
| 75 | { |
| 76 | free(buffer); |
| 77 | return 1; |
| 78 | } |
| 79 | set_LUKS_info((struct luks_phdr*)buffer, partition); |
| 80 | free(buffer); |
| 81 | return 0; |
| 82 | } |
| 83 | |
| 84 | int recover_LUKS(const disk_t *disk_car, const struct luks_phdr *sb,partition_t *partition,const int verbose, const int dump_ind) |
| 85 | { |
no test coverage detected