MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / GetBlockCount

Function GetBlockCount

Kernel/src/fs/tar.cpp:21–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21inline static long GetBlockCount(char* size){ // Get size of file in blocks
22 long sz = OctToDec(size, 12);
23 long round = (sz % 512) ? (512 - (sz % 512)) : 0; // Round up to 512 byte multiple
24 return (sz + round) / 512;
25}
26
27inline static uint32_t TarTypeToFilesystemFlags(char type){
28 switch(type){

Callers 2

ReadDirectoryMethod · 0.85
TarVolumeMethod · 0.85

Calls 1

OctToDecFunction · 0.85

Tested by

no test coverage detected