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

Function check_LVM

src/lvm.c:87–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87int check_LVM(disk_t *disk_car,partition_t *partition,const int verbose)
88{
89 unsigned char *buffer=(unsigned char*)MALLOC(LVM_PV_DISK_SIZE);
90 if(disk_car->pread(disk_car, buffer, LVM_PV_DISK_SIZE, partition->part_offset) != LVM_PV_DISK_SIZE)
91 {
92 free(buffer);
93 return 1;
94 }
95 if(test_LVM(disk_car,(pv_disk_t *)buffer,partition,verbose,0)!=0)
96 {
97 free(buffer);
98 return 1;
99 }
100 set_LVM_info(partition);
101 free(buffer);
102 return 0;
103}
104
105int recover_LVM(const disk_t *disk_car, const pv_disk_t *pv,partition_t *partition,const int verbose, const int dump_ind)
106{

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_LVMFunction · 0.85
set_LVM_infoFunction · 0.85

Tested by

no test coverage detected