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

Function test_gfs2

src/gfs2.c:43–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43static int test_gfs2(const disk_t *disk, const struct gfs2_sb *sb, const partition_t *partition, const int dump_ind)
44{
45 if(sb->sb_header.mh_magic != be32(GFS2_MAGIC))
46 return 1;
47 if(sb->sb_header.mh_format != be32(GFS2_FORMAT_SB))
48 return 1;
49 if(partition==NULL)
50 return 0;
51 if(dump_ind!=0)
52 {
53 log_info("\ngfs2 magic value at %u/%u/%u\n",
54 offset2cylinder(disk, partition->part_offset),
55 offset2head(disk, partition->part_offset),
56 offset2sector(disk, partition->part_offset));
57 dump_log(sb,DEFAULT_SECTOR_SIZE);
58 }
59 return 0;
60}
61
62int check_gfs2(disk_t *disk, partition_t *partition)
63{

Callers 2

check_gfs2Function · 0.85
recover_gfs2Function · 0.85

Calls 4

offset2cylinderFunction · 0.85
offset2headFunction · 0.85
offset2sectorFunction · 0.85
dump_logFunction · 0.85

Tested by

no test coverage detected