| 167 | } |
| 168 | |
| 169 | int recover_LVM2(const disk_t *disk_car, const unsigned char *buf,partition_t *partition,const int verbose, const int dump_ind) |
| 170 | { |
| 171 | const struct lvm2_label_header *lh=(const struct lvm2_label_header *)buf; |
| 172 | if(test_LVM2(disk_car,lh,partition,verbose,dump_ind)!=0) |
| 173 | return 1; |
| 174 | set_LVM2_info(partition); |
| 175 | partition->part_type_i386=P_LVM; |
| 176 | partition->part_type_sun=PSUN_LVM; |
| 177 | partition->part_type_gpt=GPT_ENT_TYPE_LINUX_LVM; |
| 178 | { |
| 179 | const struct lvm2_pv_header *pvhdr; |
| 180 | pvhdr=(const struct lvm2_pv_header *) (buf + le32(lh->offset_xl)); |
| 181 | partition->part_size=le64(pvhdr->device_size_xl); |
| 182 | } |
| 183 | if(verbose>0) |
| 184 | { |
| 185 | log_info("part_size %lu\n",(long unsigned)(partition->part_size/disk_car->sector_size)); |
| 186 | } |
| 187 | return 0; |
| 188 | } |
no test coverage detected