Kernel/LibC: implement chmod syscall + libc wrapper

This commit is contained in:
2023-10-25 02:35:37 +03:00
parent 657f95d3f0
commit 627b8cc140
11 changed files with 59 additions and 2 deletions

View File

@@ -55,6 +55,7 @@ __BEGIN_DECLS
#define SYS_MUNMAP 52
#define SYS_TTY_CTRL 53
#define SYS_POWEROFF 54
#define SYS_CHMOD 55
__END_DECLS

View File

@@ -4,6 +4,11 @@
#include <sys/syscall.h>
#include <unistd.h>
int chmod(const char* path, mode_t mode)
{
return syscall(SYS_CHMOD, path, mode);
}
int fstat(int fildes, struct stat* buf)
{
return syscall(SYS_FSTAT, fildes, buf);