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

Method MakeNode

Kernel/src/fs/tar.cpp:65–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 }
64
65 void TarVolume::MakeNode(tar_header_t* header, TarNode* n, ino_t inode, ino_t parent, tar_header_t* dirHeader){
66 n->parentInode = parent;
67 n->header = header;
68
69 n->inode = inode;
70 n->uid = OctToDec(header->ustar.uid, 8);
71 n->flags = TarTypeToFilesystemFlags(header->ustar.type);
72 n->vol = this;
73 n->volumeID = volumeID;
74
75 char* name = header->ustar.name;
76 char* _name = strtok(header->ustar.name, "/");
77 while(_name){
78 name = _name;
79 _name = strtok(NULL, "/");
80 }
81 strcpy(n->name, name);
82 n->size = GetSize(header->ustar.size);
83 }
84
85 int TarVolume::ReadDirectory(int blockIndex, ino_t parent){
86 ino_t dirInode = nextNode++;

Callers

nothing calls this directly

Calls 5

OctToDecFunction · 0.85
TarTypeToFilesystemFlagsFunction · 0.85
strtokFunction · 0.85
strcpyFunction · 0.85
GetSizeFunction · 0.85

Tested by

no test coverage detected