Kernel: add basic fcntl() with couple of commands and no validation
This commit is contained in:
@@ -23,3 +23,13 @@ int openat(int fd, const char* path, int oflag, ...)
|
||||
|
||||
return syscall(SYS_OPENAT, fd, path, oflag, mode);
|
||||
}
|
||||
|
||||
int fcntl(int fildes, int cmd, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, cmd);
|
||||
int extra = va_arg(args, int);
|
||||
va_end(args);
|
||||
|
||||
return syscall(SYS_FCNTL, fildes, cmd, extra);
|
||||
}
|
||||
@@ -50,6 +50,7 @@ __BEGIN_DECLS
|
||||
#define SYS_GET_PID 43
|
||||
#define SYS_GET_PGID 44
|
||||
#define SYS_SET_PGID 45
|
||||
#define SYS_FCNTL 46
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user