some coverity fixes.
[minix.git] / lib / libc / sys-minix / readlink.c
blobb141941f7ef3d308872d727d3f7c9a6656c158a0
1 #include <sys/cdefs.h>
2 #include <lib.h>
3 #include "namespace.h"
5 #include <unistd.h>
6 #include <string.h>
8 #ifdef __weak_alias
9 __weak_alias(readlink, _readlink)
10 #endif
12 ssize_t readlink(const char *name, char *buffer, size_t bufsiz)
14 message m;
16 m.m1_i1 = strlen(name) + 1;
17 m.m1_i2 = bufsiz;
18 m.m1_p1 = (char *) __UNCONST(name);
19 m.m1_p2 = (char *) buffer;
21 return(_syscall(VFS_PROC_NR, RDLNK, &m));