Kernel/LibC: Take fcntl extra field as uintptr_t
This allows passing pointers to fcntl
This commit is contained in:
parent
04d24bce70
commit
72982e3c2b
|
|
@ -33,7 +33,7 @@ namespace Kernel
|
|||
|
||||
BAN::ErrorOr<int> dup2(int, int);
|
||||
|
||||
BAN::ErrorOr<int> fcntl(int fd, int cmd, int extra);
|
||||
BAN::ErrorOr<int> fcntl(int fd, int cmd, uintptr_t extra);
|
||||
|
||||
BAN::ErrorOr<off_t> seek(int fd, off_t offset, int whence);
|
||||
BAN::ErrorOr<off_t> tell(int) const;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ namespace Kernel
|
|||
BAN::ErrorOr<long> sys_pipe(int fildes[2]);
|
||||
BAN::ErrorOr<long> sys_dup2(int fildes, int fildes2);
|
||||
|
||||
BAN::ErrorOr<long> sys_fcntl(int fildes, int cmd, int extra);
|
||||
BAN::ErrorOr<long> sys_fcntl(int fildes, int cmd, uintptr_t extra);
|
||||
|
||||
BAN::ErrorOr<long> sys_seek(int fd, off_t offset, int whence);
|
||||
BAN::ErrorOr<long> sys_tell(int fd);
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ namespace Kernel
|
|||
return fildes;
|
||||
}
|
||||
|
||||
BAN::ErrorOr<int> OpenFileDescriptorSet::fcntl(int fd, int cmd, int extra)
|
||||
BAN::ErrorOr<int> OpenFileDescriptorSet::fcntl(int fd, int cmd, uintptr_t extra)
|
||||
{
|
||||
LockGuard _(m_mutex);
|
||||
|
||||
|
|
|
|||
|
|
@ -1997,7 +1997,7 @@ namespace Kernel
|
|||
return TRY(m_open_file_descriptors.dup2(fildes, fildes2));
|
||||
}
|
||||
|
||||
BAN::ErrorOr<long> Process::sys_fcntl(int fildes, int cmd, int extra)
|
||||
BAN::ErrorOr<long> Process::sys_fcntl(int fildes, int cmd, uintptr_t extra)
|
||||
{
|
||||
return TRY(m_open_file_descriptors.fcntl(fildes, cmd, extra));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ int fcntl(int fildes, int cmd, ...)
|
|||
|
||||
va_list args;
|
||||
va_start(args, cmd);
|
||||
int extra = va_arg(args, int);
|
||||
uintptr_t extra = va_arg(args, uintptr_t);
|
||||
va_end(args);
|
||||
|
||||
return syscall(SYS_FCNTL, fildes, cmd, extra);
|
||||
|
|
|
|||
Loading…
Reference in New Issue