Kernel/LibC: implement chmod syscall + libc wrapper
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user