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

Method FindDir

Kernel/src/device.cpp:98–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 }
97
98 FsNode* FindDir(char* name) final {
99 if(!strcmp(name, ".")){
100 return this;
101 } else if(!strcmp(name, "..")){
102 return fs::GetRoot();
103 }
104
105 for(auto& dev : devices){
106 if(!strcmp(dev->GetName(), name)){
107 return dev;
108 }
109 }
110
111 return nullptr; // No such device found
112 }
113 };
114
115 DevFS devfs = DevFS("dev");

Callers

nothing calls this directly

Calls 3

strcmpFunction · 0.85
GetRootFunction · 0.85
GetNameMethod · 0.45

Tested by

no test coverage detected