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

Function Open

Kernel/src/fs/filesystem.cpp:369–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367 }
368
369 fs_fd_t* Open(FsNode* node, uint32_t flags){
370 /*if((node->flags & S_IFMT) == S_IFLNK){
371 char pathBuffer[PATH_MAX];
372
373 ssize_t bytesRead = node->ReadLink(pathBuffer, PATH_MAX);
374 if(bytesRead < 0){
375 Log::Warning("fs::Open: Readlink error");
376 return nullptr;
377 }
378 pathBuffer[bytesRead] = 0; // Null terminate
379
380 FsNode* link = fs::ResolvePath(pathBuffer);
381 if(!link){
382 Log::Warning("fs::Open: Invalid symbolic link");
383 }
384 return link->Open(flags);
385 }*/
386
387 return node->Open(flags);
388 }
389
390 int Link(FsNode* dir, FsNode* link, DirectoryEntry* ent){
391 assert(dir);

Callers

nothing calls this directly

Calls 1

OpenMethod · 0.45

Tested by

no test coverage detected