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

Function OctToDec

Kernel/src/fs/tar.cpp:6–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include <errno.h>
5
6inline static long OctToDec(char* str, int size) {
7 long n = 0;
8 while (size-- && *str) {
9 n <<= 3;
10 n |= (*str - '0') & 0x7;
11 str++;
12 }
13 return n;
14}
15
16inline static long GetSize(char* size){ // Get size of file in blocks
17 long sz = OctToDec(size, 12);

Callers 3

GetSizeFunction · 0.85
GetBlockCountFunction · 0.85
MakeNodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected