diff options
Diffstat (limited to 'src/user/lib/unistd.c')
-rw-r--r-- | src/user/lib/unistd.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/user/lib/unistd.c b/src/user/lib/unistd.c index f81e7d8..4835238 100644 --- a/src/user/lib/unistd.c +++ b/src/user/lib/unistd.c @@ -23,6 +23,18 @@ _Noreturn void exit(int c) { } _Noreturn void _exit(int c) { exit(c); }; +ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize) { + (void)path; (void)buf; (void)bufsize; + errno = ENOSYS; + return -1; +} + +int link(const char *path1, const char *path2) { + (void)path1; (void)path2; + errno = ENOSYS; + return -1; +} + int unlink(const char *path) { hid_t h = camellia_open(path, OPEN_WRITE); if (h < 0) return errno = -h, -1; @@ -31,6 +43,12 @@ int unlink(const char *path) { return 0; } +int symlink(const char *path1, const char *path2) { + (void)path1; (void)path2; + errno = ENOSYS; + return -1; +} + // TODO isatty int isatty(int fd) { return fd <= 2 ? 1 : 0; @@ -125,6 +143,17 @@ char *getcwd(char *buf, size_t capacity) { return buf; } +uid_t getuid(void) { + return 42; +} + +int chown(const char *path, uid_t owner, gid_t group) { + (void)path; (void)owner; (void)group; + errno = ENOSYS; + return -1; +} + + size_t absolutepath(char *out, const char *in, size_t size) { const char *realcwd = getrealcwd(); size_t len, pos = 0; |