20 lines
396 B
C++
20 lines
396 B
C++
|
#include <bits/errno-return.h>
|
||
|
#include <sys/mount.h>
|
||
|
#include <sys/syscall.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
extern "C"
|
||
|
{
|
||
|
int mount(const char* target, const char* fstype)
|
||
|
{
|
||
|
long rc = syscall(SYS_mount, target, fstype);
|
||
|
__errno_return(rc, int);
|
||
|
}
|
||
|
|
||
|
int umount(const char* target)
|
||
|
{
|
||
|
long rc = syscall(SYS_umount, target);
|
||
|
__errno_return(rc, int);
|
||
|
}
|
||
|
}
|