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

Function allocateSector

tools/brother120tool.cc:277–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277uint16_t allocateSector()
278{
279 for (int sector = DATA_START_SECTOR; sector != SECTOR_COUNT; sector++)
280 {
281 if (allocationTable[sector] == 0)
282 {
283 allocationTable[sector] = 0xffff;
284 return sector;
285 }
286 }
287 error("unable to allocate sector --- disk full");
288 return 0;
289}
290
291void checkConsistency()
292{

Callers 1

insertFileFunction · 0.85

Calls 1

errorFunction · 0.85

Tested by

no test coverage detected