unistd: readlink syscall is now readlinkat

This commit is contained in:
Mark 2020-10-11 16:29:11 +03:00
parent 0ef6738e26
commit 5aae060742
2 changed files with 4 additions and 12 deletions

View File

@ -1,11 +1,6 @@
#include <ygg/syscall.h>
#include <assert.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
ssize_t readlink(const char *restrict pathname, char *restrict buf, size_t count) {
(void) pathname;
(void) buf;
(void) count;
assert(0 && "system call not yet implemented");
return readlinkat(AT_FDCWD, pathname, buf, count);
}

View File

@ -1,12 +1,9 @@
#include <ygg/syscall.h>
#include <_libc/syscalls.h>
#include <assert.h>
#include <unistd.h>
#include <errno.h>
ssize_t readlinkat(int dfd, const char *restrict pathname, char *restrict buf, size_t count) {
(void) dfd;
(void) pathname;
(void) buf;
(void) count;
assert(0 && "system call not yet implemented");
return SET_ERRNO(ssize_t, __syscall4(SYSCALL_NR_READLINKAT, dfd, (long) pathname, (long) buf, count));
}