| 67 | } |
| 68 | |
| 69 | void decodeSectorRecord() override |
| 70 | { |
| 71 | if (readRaw32() != BROTHER_SECTOR_RECORD) |
| 72 | return; |
| 73 | |
| 74 | const auto& rawbits = readRawBits(32); |
| 75 | const auto& bytes = toBytes(rawbits).slice(0, 4); |
| 76 | |
| 77 | ByteReader br(bytes); |
| 78 | _sector->logicalCylinder = decode_header_gcr(br.read_be16()); |
| 79 | _sector->logicalSector = decode_header_gcr(br.read_be16()); |
| 80 | |
| 81 | /* Sanity check the values read; there's no header checksum and |
| 82 | * occasionally we get garbage due to bit errors. */ |
| 83 | if (_sector->logicalSector > 11) |
| 84 | return; |
| 85 | if (_sector->logicalCylinder > 79) |
| 86 | return; |
| 87 | |
| 88 | _sector->status = Sector::DATA_MISSING; |
| 89 | } |
| 90 | |
| 91 | void decodeDataRecord() override |
| 92 | { |
nothing calls this directly
no test coverage detected