mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
Kernel: Use Userspace<T> for the sendto syscall, and Socket implementation
Note that the data member is of type ImmutableBufferArgument, which has no Userspace<T> usage. I left it alone for now, to be fixed in a future change holistically for all usages.
This commit is contained in:
parent
d4dae49dcd
commit
9f9b05ba0f
9 changed files with 16 additions and 13 deletions
|
@ -188,7 +188,7 @@ int Process::sys$shutdown(int sockfd, int how)
|
|||
return socket.shutdown(how);
|
||||
}
|
||||
|
||||
ssize_t Process::sys$sendto(const Syscall::SC_sendto_params* user_params)
|
||||
ssize_t Process::sys$sendto(Userspace<const Syscall::SC_sendto_params*> user_params)
|
||||
{
|
||||
REQUIRE_PROMISE(stdio);
|
||||
Syscall::SC_sendto_params params;
|
||||
|
@ -196,7 +196,7 @@ ssize_t Process::sys$sendto(const Syscall::SC_sendto_params* user_params)
|
|||
return -EFAULT;
|
||||
|
||||
int flags = params.flags;
|
||||
const sockaddr* addr = params.addr;
|
||||
Userspace<const sockaddr*> addr = params.addr;
|
||||
socklen_t addr_length = params.addr_length;
|
||||
|
||||
if (!validate(params.data))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue