mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
Add basic symlink support.
- sys$readlink + readlink() - Add a /proc/PID/exe symlink to the process's executable. - Print symlink contents in ls output. - Some work on plumbing options into VFS::open().
This commit is contained in:
parent
1d4af51250
commit
97726862dd
Notes:
sideshowbarker
2024-07-19 18:36:54 +09:00
Author: https://github.com/awesomekling
Commit: 97726862dd
20 changed files with 140 additions and 46 deletions
|
@ -87,7 +87,7 @@ public:
|
|||
uid_t sys$getuid();
|
||||
gid_t sys$getgid();
|
||||
pid_t sys$getpid();
|
||||
int sys$open(const char* path, size_t pathLength);
|
||||
int sys$open(const char* path, int options);
|
||||
int sys$close(int fd);
|
||||
int sys$read(int fd, void* outbuf, size_t nread);
|
||||
int sys$lstat(const char*, Unix::stat*);
|
||||
|
@ -108,6 +108,7 @@ public:
|
|||
int sys$gethostname(char* name, size_t length);
|
||||
int sys$get_arguments(int* argc, char*** argv);
|
||||
int sys$uname(utsname*);
|
||||
int sys$readlink(const char*, char*, size_t);
|
||||
|
||||
static void initialize();
|
||||
|
||||
|
@ -134,12 +135,13 @@ public:
|
|||
bool isValidAddressForUser(LinearAddress) const;
|
||||
|
||||
InodeIdentifier cwdInode() const { return m_cwd ? m_cwd->inode : InodeIdentifier(); }
|
||||
InodeIdentifier executableInode() const { return m_executable ? m_executable->inode : InodeIdentifier(); }
|
||||
|
||||
private:
|
||||
friend class MemoryManager;
|
||||
friend bool scheduleNewTask();
|
||||
|
||||
Task(String&& name, uid_t, gid_t, pid_t parentPID, RingLevel);
|
||||
Task(String&& name, uid_t, gid_t, pid_t parentPID, RingLevel, RetainPtr<VirtualFileSystem::Node>&& = nullptr);
|
||||
|
||||
void allocateLDT();
|
||||
|
||||
|
@ -171,6 +173,7 @@ private:
|
|||
size_t m_maxFileHandles { 16 };
|
||||
|
||||
RetainPtr<VirtualFileSystem::Node> m_cwd;
|
||||
RetainPtr<VirtualFileSystem::Node> m_executable;
|
||||
|
||||
struct Region : public Retainable<Region> {
|
||||
Region(LinearAddress, size_t, RetainPtr<Zone>&&, String&&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue