| 41 | } |
| 42 | |
| 43 | static 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 | |
| 62 | int check_gfs2(disk_t *disk, partition_t *partition) |
| 63 | { |
no test coverage detected