| 47 | } |
| 48 | |
| 49 | static int test_LUKS(const disk_t *disk_car, const struct luks_phdr *sb, const partition_t *partition, const int dump_ind) |
| 50 | { |
| 51 | static const uint8_t LUKS_MAGIC[LUKS_MAGIC_L] = {'L','U','K','S', 0xba, 0xbe}; |
| 52 | if(memcmp(sb->magic, LUKS_MAGIC, LUKS_MAGIC_L)!=0) |
| 53 | return 1; |
| 54 | if(dump_ind!=0) |
| 55 | { |
| 56 | if(partition!=NULL && disk_car!=NULL) |
| 57 | log_info("\nLUKS magic value at %u/%u/%u\n", |
| 58 | offset2cylinder(disk_car,partition->part_offset), |
| 59 | offset2head(disk_car,partition->part_offset), |
| 60 | offset2sector(disk_car,partition->part_offset)); |
| 61 | dump_log(sb,DEFAULT_SECTOR_SIZE); |
| 62 | } |
| 63 | return 0; |
| 64 | } |
| 65 | |
| 66 | int check_LUKS(disk_t *disk_car,partition_t *partition) |
| 67 | { |
no test coverage detected