DragonOS/user/libs/libc/sys/stat.c

23 lines
504 B
C
Raw Normal View History

2022-06-25 12:55:59 +00:00
#include "stat.h"
2022-08-06 15:31:25 +00:00
#include <libsystem/syscall.h>
2022-06-25 12:55:59 +00:00
int mkdir(const char *path, mode_t mode)
{
2022-08-06 15:31:25 +00:00
return syscall_invoke(SYS_MKDIR, (uint64_t)path, (uint64_t)mode, 0, 0, 0, 0, 0, 0);
}
/**
* @brief
*
* @param stat
* @return int
*/
int mstat(struct mstat_t *stat)
{
return syscall_invoke(SYS_MSTAT, (uint64_t)stat, 0, 0, 0, 0, 0, 0, 0);
2022-08-20 13:47:41 +00:00
}
int pipe(int *fd)
{
return syscall_invoke(SYS_PIPE, (uint64_t)fd, 0, 0,0,0,0,0,0);
2022-06-25 12:55:59 +00:00
}