feat: implement rmdir(2), unlink(2), unlinkat(2)
[lunaix-os.git] / lunaix-os / includes / lunaix / fctrl.h
1 #ifndef __LUNAIX_FCTRL_H
2 #define __LUNAIX_FCTRL_H
3
4 #include <lunaix/dirent.h>
5 #include <lunaix/syscall.h>
6 #include <stddef.h>
7
8 __LXSYSCALL2(int, open, const char*, path, int, options);
9
10 __LXSYSCALL1(int, close, int, fd);
11
12 __LXSYSCALL1(int, mkdir, const char*, path);
13 __LXSYSCALL1(int, rmdir, const char*, pathname);
14 __LXSYSCALL1(int, unlink, const char*, pathname);
15 __LXSYSCALL2(int, unlinkat, int, fd, const char*, pathname);
16
17 __LXSYSCALL2(int, readdir, int, fd, struct dirent*, dent);
18
19 __LXSYSCALL3(int, lseek, int, fd, int, offset, int, options);
20
21 __LXSYSCALL3(int, read, int, fd, void*, buf, unsigned int, count);
22
23 __LXSYSCALL3(int, write, int, fd, void*, buf, unsigned int, count);
24
25 __LXSYSCALL3(int, readlink, const char*, path, char*, buf, size_t, size);
26
27 __LXSYSCALL4(int,
28              readlinkat,
29              int,
30              dirfd,
31              const char*,
32              pathname,
33              char*,
34              buf,
35              size_t,
36              size);
37
38 #endif /* __LUNAIX_FCTRL_H */