]> granicus.if.org Git - strace/commit
Introduce a separate function to copy from msghdr32 to msghdr
authorMasatake YAMATO <yamato@redhat.com>
Thu, 6 Nov 2014 16:23:24 +0000 (01:23 +0900)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 11 Nov 2014 15:41:37 +0000 (15:41 +0000)
commitb248543be91457a6c0567a4b057ff0acc361efc2
tree3099529f53c61f21778f51aa05e92c2d68c2d071
parent00119f63fa91ee3612a95b91872abc89ac6ff7e1
Introduce a separate function to copy from msghdr32 to msghdr

This patch is an initial step for supporting "-e write=set" and
"-e read=set" option for sendmmsg and recvmmsg system calls.

Coverting a data of msghdr32 to msghdr is needed both for
{send,recv}msg and {send,recv}mmsg to decode parameters.
To share the copying code in both decoders, a separate
function named copy_from_msghdr32 is introduced.

* net.c [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4]
(copy_from_msghdr32): New function.
(extractmsghdr) [SUPPORTED_PERSONALITIES > 1 && SIZEOF_LONG > 4]: Use it.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
net.c