2023-05-17 20:30:15 +02:00
|
|
|
#include <bits/errno-return.h>
|
|
|
|
#include <sys/mount.h>
|
|
|
|
#include <sys/syscall.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
2023-06-20 21:39:41 +02:00
|
|
|
int mount(const char* target, const char* fstype, const char* source)
|
2023-05-17 20:30:15 +02:00
|
|
|
{
|
2023-06-20 21:39:41 +02:00
|
|
|
long rc = syscall(SYS_mount, target, fstype, source);
|
2023-05-17 20:30:15 +02:00
|
|
|
__errno_return(rc, int);
|
|
|
|
}
|
|
|
|
|
|
|
|
int umount(const char* target)
|
|
|
|
{
|
|
|
|
long rc = syscall(SYS_umount, target);
|
|
|
|
__errno_return(rc, int);
|
|
|
|
}
|
|
|
|
}
|