| 129 | } |
| 130 | |
| 131 | static int test_LVM2(const disk_t *disk_car, const struct lvm2_label_header *lh, const partition_t *partition, const int verbose, const int dump_ind) |
| 132 | { |
| 133 | if (memcmp((const char *)lh->type,LVM2_LABEL,sizeof(lh->type)) == 0) |
| 134 | { |
| 135 | if(verbose>0 || dump_ind!=0) |
| 136 | { |
| 137 | log_info("\nLVM2 magic value at %u/%u/%u\n", offset2cylinder(disk_car,partition->part_offset),offset2head(disk_car,partition->part_offset),offset2sector(disk_car,partition->part_offset)); |
| 138 | } |
| 139 | if(le32(lh->offset_xl)>400) |
| 140 | return 1; |
| 141 | if(dump_ind!=0) |
| 142 | { |
| 143 | /* There is a little offset ... */ |
| 144 | dump_log(lh,DEFAULT_SECTOR_SIZE); |
| 145 | } |
| 146 | return 0; |
| 147 | } |
| 148 | return 1; |
| 149 | } |
| 150 | |
| 151 | int check_LVM2(disk_t *disk_car,partition_t *partition,const int verbose) |
| 152 | { |
no test coverage detected