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

Function check_gfs2

src/gfs2.c:62–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62int check_gfs2(disk_t *disk, partition_t *partition)
63{
64 unsigned char *buffer;
65 buffer=(unsigned char*)MALLOC(512);
66 if(disk->pread(disk, buffer, 512, partition->part_offset + (GFS2_SB_ADDR << GFS2_BASIC_BLOCK_SHIFT)) != 512)
67 {
68 free(buffer);
69 return 1;
70 }
71 if(test_gfs2(disk, (const struct gfs2_sb *)buffer, partition,0)!=0)
72 {
73 free(buffer);
74 return 1;
75 }
76 set_gfs2_info(partition);
77 free(buffer);
78 return 0;
79}
80
81int recover_gfs2(const disk_t *disk, const struct gfs2_sb *sb, partition_t *partition, const int dump_ind)
82{

Callers 2

check_part_noneFunction · 0.85
check_linuxFunction · 0.85

Calls 3

MALLOCFunction · 0.85
test_gfs2Function · 0.85
set_gfs2_infoFunction · 0.85

Tested by

no test coverage detected