| 246 | |
| 247 | private: |
| 248 | void mount() |
| 249 | { |
| 250 | auto rootVolume = getLogicalBlock(ROOT_DIRECTORY_BLOCK); |
| 251 | if ((rootVolume[4] & 0xf0) != 0xf0) |
| 252 | throw BadFilesystemException(); |
| 253 | |
| 254 | ByteReader br(rootVolume); |
| 255 | br.seek(0x27); |
| 256 | _allocationBitmapLocation = br.read_le16(); |
| 257 | uint16_t totalBlocks = br.read_le16(); |
| 258 | |
| 259 | uint16_t bitmapBlocks = (totalBlocks + 4095) / 4096; |
| 260 | _allocationBitmap = |
| 261 | getLogicalBlock(_allocationBitmapLocation, bitmapBlocks).toBits(); |
| 262 | _allocationBitmap.resize(totalBlocks); |
| 263 | } |
| 264 | |
| 265 | std::unique_ptr<Directory> chdir(const Path& path) |
| 266 | { |
nothing calls this directly
no test coverage detected