| 92 | } |
| 93 | |
| 94 | int recover_sysv(const disk_t *disk_car, const struct sysv4_super_block *sbd, partition_t *partition,const int verbose, const int dump_ind) |
| 95 | { |
| 96 | if(test_sysv4(disk_car, sbd,partition, verbose)!=0) |
| 97 | return 1; |
| 98 | if(verbose>0 || dump_ind!=0) |
| 99 | { |
| 100 | log_info("\nrecover_sysv4\n"); |
| 101 | if(dump_ind!=0) |
| 102 | { |
| 103 | dump_log(sbd,sizeof(*sbd)); |
| 104 | } |
| 105 | } |
| 106 | switch((unsigned)sbd->s_magic) |
| 107 | { |
| 108 | case le32(0xfd187e20): |
| 109 | partition->part_size = (uint64_t)le32(sbd->s_fsize)*(512<<(le32(sbd->s_type)-1)); |
| 110 | break; |
| 111 | case be32(0xfd187e20): |
| 112 | partition->part_size = (uint64_t)be32(sbd->s_fsize)*(512<<(be32(sbd->s_type)-1)); |
| 113 | break; |
| 114 | } |
| 115 | set_sysv4_info(sbd, partition); |
| 116 | partition->part_type_i386 = P_SYSV; |
| 117 | return 0; |
| 118 | } |
| 119 | |
| 120 | static void set_sysv4_info(const struct sysv4_super_block *sbd, partition_t *partition) |
| 121 | { |
no test coverage detected