| 116 | } |
| 117 | |
| 118 | static int test_rfs4(const disk_t *disk_car, const struct reiser4_master_sb *sb, const partition_t *partition, const int verbose) |
| 119 | { |
| 120 | if (memcmp(sb->magic,REISERFS4_SUPER_MAGIC,sizeof(REISERFS4_SUPER_MAGIC)) != 0) |
| 121 | return 1; |
| 122 | if(verbose>0) |
| 123 | log_info("\nReiserFS Marker at %u/%u/%u\n", offset2cylinder(disk_car,partition->part_offset),offset2head(disk_car,partition->part_offset),offset2sector(disk_car,partition->part_offset)); |
| 124 | /* |
| 125 | * sanity checks. |
| 126 | */ |
| 127 | if (le16(sb->blocksize) != 4096) |
| 128 | return (1); |
| 129 | /* if a value > 4096 become legal, the code will break while reading the filesystem size (read out of bound) */ |
| 130 | return 0; |
| 131 | } |
| 132 | |
| 133 | int recover_rfs(const disk_t *disk_car, const struct reiserfs_super_block *sb,partition_t *partition,const int verbose, const int dump_ind) |
| 134 | { |
no test coverage detected