readlink.c 269 B

1234567891011
  1. #include <unistd.h>
  2. #include <errno.h>
  3. #include <syscall.h>
  4. #include <syscall_nums.h>
  5. DEFN_SYSCALL3(readlink, SYS_READLINK, char *, char *, int);
  6. ssize_t readlink(const char * name, char * buf, size_t len) {
  7. __sets_errno(syscall_readlink((char*)name, buf, len));
  8. }