MCPcopy Create free account
hub / github.com/Gregwar/fatcat / init

Method init

src/core/FatSystem.cpp:655–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

653 }
654}
655bool FatSystem::init()
656{
657 // Parsing header
658 parseHeader();
659
660 // Computing values
661 fatStart = bytesPerSector*reservedSectors;
662 dataStart = fatStart + fats*sectorsPerFat*bytesPerSector;
663 bytesPerCluster = bytesPerSector*sectorsPerCluster;
664 totalSize = totalSectors*bytesPerSector;
665 fatSize = sectorsPerFat*bytesPerSector;
666 totalClusters = (fatSize*8)/bits;
667 dataSize = totalClusters*bytesPerCluster;
668
669 if (type == FAT16) {
670 int rootBytes = rootEntries*32;
671 rootClusters = rootBytes/bytesPerCluster + ((rootBytes%bytesPerCluster) ? 1 : 0);
672 }
673
674 return strange == 0;
675}
676
677void FatSystem::infos()
678{

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected