diff options
Diffstat (limited to 'lib/libc/sys')
| -rw-r--r-- | lib/libc/sys/ioctl.c | 13 | ||||
| -rw-r--r-- | lib/libc/sys/mount.c | 8 | ||||
| -rw-r--r-- | lib/libc/sys/umount.c | 6 | ||||
| -rw-r--r-- | lib/libc/sys/umount2.c | 6 |
4 files changed, 33 insertions, 0 deletions
diff --git a/lib/libc/sys/ioctl.c b/lib/libc/sys/ioctl.c new file mode 100644 index 00000000..9d7cde36 --- /dev/null +++ b/lib/libc/sys/ioctl.c @@ -0,0 +1,13 @@ +#include <stdarg.h> +#include <syscall.h> + +int ioctl(int fildes, unsigned long request, ...) +{ + void *arg; + va_list ap; + va_start(ap, request); + arg = va_arg(ap, void *); + va_end(ap); + + return syscall(ioctl, fildes, request, arg); +} diff --git a/lib/libc/sys/mount.c b/lib/libc/sys/mount.c new file mode 100644 index 00000000..0cb95fcf --- /dev/null +++ b/lib/libc/sys/mount.c @@ -0,0 +1,8 @@ +#include <syscall.h> +#include <sys/mount.h> + +int mount(const char *source, const char *target, const char *filesystemtype, + unsigned long mountflags, const void *_Nullable data) +{ + return syscall(mount, source, target, filesystemtype, mountflags, data); +} diff --git a/lib/libc/sys/umount.c b/lib/libc/sys/umount.c new file mode 100644 index 00000000..ae1ecf8a --- /dev/null +++ b/lib/libc/sys/umount.c @@ -0,0 +1,6 @@ +#include <syscall.h> + +int umount(const char *target) +{ + return syscall(umount2, target, 0); +} diff --git a/lib/libc/sys/umount2.c b/lib/libc/sys/umount2.c new file mode 100644 index 00000000..a75588a8 --- /dev/null +++ b/lib/libc/sys/umount2.c @@ -0,0 +1,6 @@ +#include <syscall.h> + +int umount2(const char *target, int flags) +{ + return syscall(umount2, target, flags); +} |
