Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linux/linux_socket.c
Show First 20 Lines • Show All 1,532 Lines • ▼ Show 20 Lines | linux_recvmsg_common(struct thread *td, l_int s, struct l_msghdr *msghdr, | ||||
caddr_t outbuf; | caddr_t outbuf; | ||||
void *data; | void *data; | ||||
int error, i, fd, fds, *fdp; | int error, i, fd, fds, *fdp; | ||||
error = copyin(msghdr, &linux_msghdr, sizeof(linux_msghdr)); | error = copyin(msghdr, &linux_msghdr, sizeof(linux_msghdr)); | ||||
if (error != 0) | if (error != 0) | ||||
return (error); | return (error); | ||||
/* | |||||
* Pass user-supplied recvmsg() flags in msg_flags field, | |||||
* following sys_recvmsg() convention. | |||||
*/ | |||||
linux_msghdr.msg_flags = flags; | |||||
error = linux_to_bsd_msghdr(msg, &linux_msghdr); | error = linux_to_bsd_msghdr(msg, &linux_msghdr); | ||||
if (error != 0) | if (error != 0) | ||||
return (error); | return (error); | ||||
#ifdef COMPAT_LINUX32 | #ifdef COMPAT_LINUX32 | ||||
error = linux32_copyiniov(PTRIN(msg->msg_iov), msg->msg_iovlen, | error = linux32_copyiniov(PTRIN(msg->msg_iov), msg->msg_iovlen, | ||||
&iov, EMSGSIZE); | &iov, EMSGSIZE); | ||||
#else | #else | ||||
▲ Show 20 Lines • Show All 726 Lines • Show Last 20 Lines |