2023-03-12 14:32:09 +00:00
|
|
|
#include <bits/errno-return.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/syscall.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
2023-03-12 15:55:46 +00:00
|
|
|
int mkdir(const char* path, mode_t mode)
|
2023-03-12 14:32:09 +00:00
|
|
|
{
|
2023-03-12 15:55:46 +00:00
|
|
|
long rc = syscall(SYS_mkdir, path, mode);
|
2023-03-12 14:32:09 +00:00
|
|
|
__errno_return(rc, int);
|
|
|
|
}
|
2023-03-18 08:13:31 +00:00
|
|
|
|
|
|
|
int mknod(const char* path, mode_t mode, dev_t dev)
|
|
|
|
{
|
|
|
|
long rc = syscall(SYS_mknod, path, mode, dev);
|
|
|
|
__errno_return(rc, int);
|
|
|
|
}
|
2023-03-12 14:32:09 +00:00
|
|
|
}
|