| 51 | } |
| 52 | |
| 53 | static int test_JFS(const disk_t *disk_car, const struct jfs_superblock *sb, const partition_t *partition, const int dump_ind) |
| 54 | { |
| 55 | if(memcmp(sb->s_magic,"JFS1",4)!=0) |
| 56 | return 1; |
| 57 | /* Blocksize must be a multiple of 512 */ |
| 58 | if(le32(sb->s_bsize)<512 || |
| 59 | ((le32(sb->s_bsize)-1) & le32(sb->s_bsize))!=0) |
| 60 | return 1; |
| 61 | if(dump_ind!=0) |
| 62 | { |
| 63 | log_info("\nJFS magic value at %u/%u/%u\n", offset2cylinder(disk_car,partition->part_offset),offset2head(disk_car,partition->part_offset),offset2sector(disk_car,partition->part_offset)); |
| 64 | /* There is a little offset ... */ |
| 65 | dump_log(sb,DEFAULT_SECTOR_SIZE); |
| 66 | } |
| 67 | /* |
| 68 | if( le32(sb->s_agsize) >= (1 << L2BPERDMAP) ) { |
| 69 | return 2; |
| 70 | } |
| 71 | if(partition->part_size!=0 && (partition->part_size<le64(sb->s_size))) |
| 72 | return 8; |
| 73 | */ |
| 74 | return 0; |
| 75 | } |
| 76 | |
| 77 | int check_JFS(disk_t *disk_car, partition_t *partition) |
| 78 | { |
no test coverage detected