MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / mount

Method mount

lib/vfs/prodos.cc:248–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246
247private:
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 {

Callers

nothing calls this directly

Calls 5

read_le16Method · 0.80
toBitsMethod · 0.80
seekMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected