MCPcopy Create free account
hub / github.com/cgsecurity/testdisk / check_LVM2

Function check_LVM2

src/lvm.c:151–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151int check_LVM2(disk_t *disk_car,partition_t *partition,const int verbose)
152{
153 unsigned char *buffer=(unsigned char *)MALLOC(DEFAULT_SECTOR_SIZE);
154 if(disk_car->pread(disk_car, buffer, DEFAULT_SECTOR_SIZE, partition->part_offset + 0x200) != DEFAULT_SECTOR_SIZE)
155 {
156 free(buffer);
157 return 1;
158 }
159 if(test_LVM2(disk_car,(const struct lvm2_label_header *)buffer,partition,verbose,0)!=0)
160 {
161 free(buffer);
162 return 1;
163 }
164 set_LVM2_info(partition);
165 free(buffer);
166 return 0;
167}
168
169int recover_LVM2(const disk_t *disk_car, const unsigned char *buf,partition_t *partition,const int verbose, const int dump_ind)
170{

Callers 4

check_part_gptFunction · 0.85
check_part_sunFunction · 0.85
check_part_noneFunction · 0.85
check_part_i386Function · 0.85

Calls 3

MALLOCFunction · 0.85
test_LVM2Function · 0.85
set_LVM2_infoFunction · 0.85

Tested by

no test coverage detected