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

Function FindDir

Kernel/src/fs/initrd.cpp:130–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128 }
129
130 fs_node_t* FindDir(fs_node_t* node, char* name) {
131 for(int i = 0; i < initrdHeader.fileCount;i++){
132 if(strcmp(fsNodes[i].name,name) == 0) return &(fsNodes[i]);
133 }
134
135 if(strcmp(".", name) == 0) return node;
136 if(strcmp("..", name) == 0) return fs::GetRoot();
137
138 return NULL;
139 }
140
141
142 lemoninitfs_node_t* List() {

Callers 4

FindDirMethod · 0.70
CreateMethod · 0.70
CreateDirectoryMethod · 0.70
kmainFunction · 0.50

Calls 2

strcmpFunction · 0.85
GetRootFunction · 0.85

Tested by

no test coverage detected