feat: implement readlink(2) readlinkat(2)
[lunaix-os.git] / lunaix-os / includes / lunaix / fctrl.h
index e76ae7b05263c405624cf113ba7aabacc67bacd2..0cd2705e4d9c1ce984f66c91ff7ff118051f6794 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <lunaix/dirent.h>
 #include <lunaix/syscall.h>
 
 #include <lunaix/dirent.h>
 #include <lunaix/syscall.h>
+#include <stddef.h>
 
 __LXSYSCALL2(int, open, const char*, path, int, options);
 
 
 __LXSYSCALL2(int, open, const char*, path, int, options);
 
@@ -18,4 +19,17 @@ __LXSYSCALL3(int, read, int, fd, void*, buf, unsigned int, count);
 
 __LXSYSCALL3(int, write, int, fd, void*, buf, unsigned int, count);
 
 
 __LXSYSCALL3(int, write, int, fd, void*, buf, unsigned int, count);
 
+__LXSYSCALL3(int, readlink, const char*, path, char*, buf, size_t, size);
+
+__LXSYSCALL4(int,
+             readlinkat,
+             int,
+             dirfd,
+             const char*,
+             pathname,
+             char*,
+             buf,
+             size_t,
+             size);
+
 #endif /* __LUNAIX_FCTRL_H */
 #endif /* __LUNAIX_FCTRL_H */