mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
de4604ac95
Added a /bin/mkdir that makes directories. How very neat :^) There are various limitations because of missing functionality.
19 lines
344 B
C++
19 lines
344 B
C++
#include <sys/stat.h>
|
|
#include <errno.h>
|
|
#include <Kernel/Syscall.h>
|
|
|
|
extern "C" {
|
|
|
|
mode_t umask(mode_t mask)
|
|
{
|
|
return Syscall::invoke(Syscall::SC_umask, (dword)mask);
|
|
}
|
|
|
|
int mkdir(const char* pathname, mode_t mode)
|
|
{
|
|
int rc = Syscall::invoke(Syscall::SC_mkdir, (dword)pathname, (dword)mode);
|
|
__RETURN_WITH_ERRNO(rc, rc, -1);
|
|
}
|
|
|
|
}
|
|
|