mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:17:45 +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
20 changed files with 140 additions and 46 deletions
|
@ -7,7 +7,7 @@ extern "C" {
|
|||
uid_t getuid();
|
||||
gid_t getgid();
|
||||
pid_t getpid();
|
||||
int open(const char* path);
|
||||
int open(const char* path, int options);
|
||||
ssize_t read(int fd, void* buf, size_t count);
|
||||
int close(int fd);
|
||||
pid_t waitpid(pid_t, int* wstatus, int options);
|
||||
|
@ -16,6 +16,7 @@ char* getcwd(char* buffer, size_t size);
|
|||
int lstat(const char* path, stat* statbuf);
|
||||
int sleep(unsigned seconds);
|
||||
int gethostname(char*, size_t);
|
||||
ssize_t readlink(const char* path, char* buffer, size_t);
|
||||
|
||||
#define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
|
||||
#define WTERMSIG(status) ((status) & 0x7f)
|
||||
|
@ -52,4 +53,10 @@ int gethostname(char*, size_t);
|
|||
#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
|
||||
#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
|
||||
|
||||
#define O_RDONLY 0
|
||||
#define O_WRONLY 1
|
||||
#define O_RDWR 2
|
||||
#define O_DIRECTORY 00200000
|
||||
#define O_NOFOLLOW 00400000
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue