1999-02-19 03:21:36 +03:00
/*
* Copyright ( c ) 1991 , 1992 Paul Kranenburg < pk @ cs . few . eur . nl >
* Copyright ( c ) 1993 Branko Lankester < branko @ hacktic . nl >
* Copyright ( c ) 1993 , 1994 , 1995 , 1996 Rick Sladkey < jrs @ world . std . com >
1999-12-23 17:20:14 +03:00
* Copyright ( c ) 1996 - 1999 Wichert Akkerman < wichert @ cistron . nl >
1999-02-19 03:21:36 +03:00
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions
* are met :
* 1. Redistributions of source code must retain the above copyright
* notice , this list of conditions and the following disclaimer .
* 2. Redistributions in binary form must reproduce the above copyright
* notice , this list of conditions and the following disclaimer in the
* documentation and / or other materials provided with the distribution .
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission .
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS ' ' AND ANY EXPRESS OR
* IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED .
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT , INDIRECT ,
* INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT
* NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE ,
* DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
* ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
*/
# include "defs.h"
# include <fcntl.h>
2014-11-21 23:46:16 +03:00
# include <sys/uio.h>
1999-02-19 03:21:36 +03:00
2015-04-07 04:36:50 +03:00
SYS_FUNC ( read )
1999-02-19 03:21:36 +03:00
{
if ( entering ( tcp ) ) {
Fix decoding of file descriptors
* defs.h (printfd): New function prototype.
* util.c (printfd): New function.
* file.c (print_dirfd): Update prototype to use printfd().
(sys_openat, sys_faccessat, sys_newfstatat, sys_mkdirat, sys_linkat,
sys_unlinkat, sys_readlinkat, sys_renameat, sys_fchownat, sys_fchmodat,
sys_futimesat, sys_utimensat, sys_mknodat): Update use of print_dirfd().
(sys_lseek, sys_llseek, sys_readahead, sys_ftruncate, sys_ftruncate64,
sys_fstat, sys_fstat64, sys_oldfstat, sys_fstatfs, sys_fstatfs64,
sys_fchdir, sys_fchroot, sys_linkat, sys_fchown, sys_fchmod, sys_fsync,
sys_readdir, sys_getdents, sys_getdirentries, sys_fsetxattr,
sys_fgetxattr, sys_flistxattr, sys_fremovexattr, sys_fadvise64,
sys_fadvise64_64, sys_inotify_add_watch, sys_inotify_rm_watch,
sys_fallocate): Use printfd() for decoding of file descriptors.
* desc.c (sys_fcntl, sys_flock, sys_close, sys_dup, do_dup2,
decode_select, sys_epoll_ctl, epoll_wait_common): Use printfd() for
decoding of file descriptors.
* io.c (sys_read, sys_write, sys_readv, sys_writev, sys_pread,
sys_pwrite, sys_sendfile, sys_sendfile64, sys_pread64, sys_pwrite64,
sys_ioctl): Likewise.
* mem.c (print_mmap, sys_mmap64): Likewise.
* signal.c (do_signalfd): Likewise.
* stream.c (decode_poll): Likewise.
* time.c (sys_timerfd_settime, sys_timerfd_gettime): Likewise.
Based on patch from Grant Edwards <grant.b.edwards@gmail.com>.
2011-03-04 05:08:02 +03:00
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
2011-09-01 12:00:28 +04:00
tprints ( " , " ) ;
1999-02-19 03:21:36 +03:00
} else {
if ( syserror ( tcp ) )
2015-07-20 14:06:54 +03:00
printaddr ( tcp - > u_arg [ 1 ] ) ;
1999-02-19 03:21:36 +03:00
else
printstr ( tcp , tcp - > u_arg [ 1 ] , tcp - > u_rval ) ;
tprintf ( " , %lu " , tcp - > u_arg [ 2 ] ) ;
}
return 0 ;
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( write )
1999-02-19 03:21:36 +03:00
{
2015-07-20 14:19:30 +03:00
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
tprints ( " , " ) ;
printstr ( tcp , tcp - > u_arg [ 1 ] , tcp - > u_arg [ 2 ] ) ;
tprintf ( " , %lu " , tcp - > u_arg [ 2 ] ) ;
return RVAL_DECODED ;
1999-02-19 03:21:36 +03:00
}
2016-05-08 01:54:04 +03:00
struct print_iovec_config {
2016-06-22 16:27:03 +03:00
enum iov_decode decode_iov ;
2016-05-08 01:54:04 +03:00
unsigned long data_size ;
} ;
static bool
print_iovec ( struct tcb * tcp , void * elem_buf , size_t elem_size , void * data )
{
const unsigned long * iov ;
2016-06-22 16:27:03 +03:00
unsigned long iov_buf [ 2 ] , len ;
2016-05-08 01:54:04 +03:00
struct print_iovec_config * c = data ;
if ( elem_size < sizeof ( iov_buf ) ) {
iov_buf [ 0 ] = ( ( unsigned int * ) elem_buf ) [ 0 ] ;
iov_buf [ 1 ] = ( ( unsigned int * ) elem_buf ) [ 1 ] ;
iov = iov_buf ;
} else {
iov = elem_buf ;
}
2016-07-14 01:54:55 +03:00
tprints ( " {iov_base= " ) ;
2016-05-08 01:54:04 +03:00
2016-06-22 16:27:03 +03:00
len = iov [ 1 ] ;
switch ( c - > decode_iov ) {
case IOV_DECODE_STR :
if ( len > c - > data_size )
len = c - > data_size ;
2016-09-29 15:57:55 +03:00
if ( c - > data_size ! = ( unsigned long ) - 1L )
c - > data_size - = len ;
2016-06-22 16:27:03 +03:00
printstr ( tcp , iov [ 0 ] , len ) ;
break ;
2016-07-06 18:49:22 +03:00
case IOV_DECODE_NETLINK :
if ( len > c - > data_size )
len = c - > data_size ;
2016-09-29 15:57:55 +03:00
if ( c - > data_size ! = ( unsigned long ) - 1L )
c - > data_size - = len ;
2016-07-06 18:49:22 +03:00
decode_netlink ( tcp , iov [ 0 ] , iov [ 1 ] ) ;
break ;
2016-06-22 16:27:03 +03:00
default :
printaddr ( iov [ 0 ] ) ;
break ;
2016-05-08 01:54:04 +03:00
}
2016-07-14 01:54:55 +03:00
tprintf ( " , iov_len=%lu} " , iov [ 1 ] ) ;
2016-05-08 01:54:04 +03:00
return true ;
}
2012-04-28 16:26:18 +04:00
/*
* data_size limits the cumulative size of printed data .
* Example : recvmsg returing a short read .
*/
2000-09-02 01:03:06 +04:00
void
2016-05-08 01:54:04 +03:00
tprint_iov_upto ( struct tcb * tcp , unsigned long len , unsigned long addr ,
2016-06-22 16:27:03 +03:00
enum iov_decode decode_iov , unsigned long data_size )
2000-09-02 01:03:06 +04:00
{
2015-09-15 05:17:32 +03:00
unsigned long iov [ 2 ] ;
2016-05-08 01:54:04 +03:00
struct print_iovec_config config =
{ . decode_iov = decode_iov , . data_size = data_size } ;
2000-09-02 01:03:06 +04:00
2016-05-08 01:54:04 +03:00
print_array ( tcp , addr , len , iov , current_wordsize * 2 ,
umoven_or_printaddr , print_iovec , & config ) ;
2000-09-02 01:03:06 +04:00
}
2012-04-28 16:26:18 +04:00
void
2016-06-22 16:27:03 +03:00
tprint_iov ( struct tcb * tcp , unsigned long len , unsigned long addr ,
enum iov_decode decode_iov )
2012-04-28 16:26:18 +04:00
{
2012-05-02 00:30:02 +04:00
tprint_iov_upto ( tcp , len , addr , decode_iov , ( unsigned long ) - 1L ) ;
2012-04-28 16:26:18 +04:00
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( readv )
1999-02-19 03:21:36 +03:00
{
if ( entering ( tcp ) ) {
Fix decoding of file descriptors
* defs.h (printfd): New function prototype.
* util.c (printfd): New function.
* file.c (print_dirfd): Update prototype to use printfd().
(sys_openat, sys_faccessat, sys_newfstatat, sys_mkdirat, sys_linkat,
sys_unlinkat, sys_readlinkat, sys_renameat, sys_fchownat, sys_fchmodat,
sys_futimesat, sys_utimensat, sys_mknodat): Update use of print_dirfd().
(sys_lseek, sys_llseek, sys_readahead, sys_ftruncate, sys_ftruncate64,
sys_fstat, sys_fstat64, sys_oldfstat, sys_fstatfs, sys_fstatfs64,
sys_fchdir, sys_fchroot, sys_linkat, sys_fchown, sys_fchmod, sys_fsync,
sys_readdir, sys_getdents, sys_getdirentries, sys_fsetxattr,
sys_fgetxattr, sys_flistxattr, sys_fremovexattr, sys_fadvise64,
sys_fadvise64_64, sys_inotify_add_watch, sys_inotify_rm_watch,
sys_fallocate): Use printfd() for decoding of file descriptors.
* desc.c (sys_fcntl, sys_flock, sys_close, sys_dup, do_dup2,
decode_select, sys_epoll_ctl, epoll_wait_common): Use printfd() for
decoding of file descriptors.
* io.c (sys_read, sys_write, sys_readv, sys_writev, sys_pread,
sys_pwrite, sys_sendfile, sys_sendfile64, sys_pread64, sys_pwrite64,
sys_ioctl): Likewise.
* mem.c (print_mmap, sys_mmap64): Likewise.
* signal.c (do_signalfd): Likewise.
* stream.c (decode_poll): Likewise.
* time.c (sys_timerfd_settime, sys_timerfd_gettime): Likewise.
Based on patch from Grant Edwards <grant.b.edwards@gmail.com>.
2011-03-04 05:08:02 +03:00
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
2011-09-01 12:00:28 +04:00
tprints ( " , " ) ;
1999-02-19 03:21:36 +03:00
} else {
2016-06-22 16:27:03 +03:00
tprint_iov_upto ( tcp , tcp - > u_arg [ 2 ] , tcp - > u_arg [ 1 ] ,
IOV_DECODE_STR , tcp - > u_rval ) ;
1999-02-19 03:21:36 +03:00
tprintf ( " , %lu " , tcp - > u_arg [ 2 ] ) ;
}
return 0 ;
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( writev )
1999-02-19 03:21:36 +03:00
{
2015-07-20 14:19:30 +03:00
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
tprints ( " , " ) ;
2016-06-22 16:27:03 +03:00
tprint_iov ( tcp , tcp - > u_arg [ 2 ] , tcp - > u_arg [ 1 ] , IOV_DECODE_STR ) ;
2015-07-20 14:19:30 +03:00
tprintf ( " , %lu " , tcp - > u_arg [ 2 ] ) ;
return RVAL_DECODED ;
1999-02-19 03:21:36 +03:00
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( pread )
1999-02-19 03:21:36 +03:00
{
if ( entering ( tcp ) ) {
Fix decoding of file descriptors
* defs.h (printfd): New function prototype.
* util.c (printfd): New function.
* file.c (print_dirfd): Update prototype to use printfd().
(sys_openat, sys_faccessat, sys_newfstatat, sys_mkdirat, sys_linkat,
sys_unlinkat, sys_readlinkat, sys_renameat, sys_fchownat, sys_fchmodat,
sys_futimesat, sys_utimensat, sys_mknodat): Update use of print_dirfd().
(sys_lseek, sys_llseek, sys_readahead, sys_ftruncate, sys_ftruncate64,
sys_fstat, sys_fstat64, sys_oldfstat, sys_fstatfs, sys_fstatfs64,
sys_fchdir, sys_fchroot, sys_linkat, sys_fchown, sys_fchmod, sys_fsync,
sys_readdir, sys_getdents, sys_getdirentries, sys_fsetxattr,
sys_fgetxattr, sys_flistxattr, sys_fremovexattr, sys_fadvise64,
sys_fadvise64_64, sys_inotify_add_watch, sys_inotify_rm_watch,
sys_fallocate): Use printfd() for decoding of file descriptors.
* desc.c (sys_fcntl, sys_flock, sys_close, sys_dup, do_dup2,
decode_select, sys_epoll_ctl, epoll_wait_common): Use printfd() for
decoding of file descriptors.
* io.c (sys_read, sys_write, sys_readv, sys_writev, sys_pread,
sys_pwrite, sys_sendfile, sys_sendfile64, sys_pread64, sys_pwrite64,
sys_ioctl): Likewise.
* mem.c (print_mmap, sys_mmap64): Likewise.
* signal.c (do_signalfd): Likewise.
* stream.c (decode_poll): Likewise.
* time.c (sys_timerfd_settime, sys_timerfd_gettime): Likewise.
Based on patch from Grant Edwards <grant.b.edwards@gmail.com>.
2011-03-04 05:08:02 +03:00
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
2011-09-01 12:00:28 +04:00
tprints ( " , " ) ;
1999-02-19 03:21:36 +03:00
} else {
if ( syserror ( tcp ) )
2015-07-20 14:06:54 +03:00
printaddr ( tcp - > u_arg [ 1 ] ) ;
1999-02-19 03:21:36 +03:00
else
printstr ( tcp , tcp - > u_arg [ 1 ] , tcp - > u_rval ) ;
2009-11-04 19:08:34 +03:00
tprintf ( " , %lu, " , tcp - > u_arg [ 2 ] ) ;
2016-08-20 17:02:55 +03:00
printllval ( tcp , " %lld " , 3 ) ;
1999-02-19 03:21:36 +03:00
}
return 0 ;
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( pwrite )
1999-02-19 03:21:36 +03:00
{
2015-07-20 14:19:30 +03:00
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
tprints ( " , " ) ;
printstr ( tcp , tcp - > u_arg [ 1 ] , tcp - > u_arg [ 2 ] ) ;
tprintf ( " , %lu, " , tcp - > u_arg [ 2 ] ) ;
2016-08-20 17:02:55 +03:00
printllval ( tcp , " %lld " , 3 ) ;
2015-07-20 14:19:30 +03:00
return RVAL_DECODED ;
1999-05-09 04:29:58 +04:00
}
Fix preadv/pwritev offset decoding on bigendian architectures
This partially reverts commit 7845a42b39e59e904d01e75e21f7bc7eb6462560.
* util.c (printllval): Remove align argument.
* defs.h (printllval): Update prototype.
(printllval_aligned, printllval_unaligned): Remove.
* file.c (sys_readahead, sys_truncate64, sys_ftruncate64, sys_fadvise64,
sys_fadvise64_64, sys_sync_file_range, sys_sync_file_range2,
sys_fallocate): Replace printllval_aligned call with printllval.
* io.c (sys_pread, sys_pwrite): Likewise.
(print_llu_from_low_high_val): New function.
(sys_preadv, sys_pwritev): Use it instead of printllval_unaligned.
2014-08-07 04:07:28 +04:00
static void
2016-03-30 06:54:21 +03:00
print_lld_from_low_high_val ( struct tcb * tcp , int arg )
Fix preadv/pwritev offset decoding on bigendian architectures
This partially reverts commit 7845a42b39e59e904d01e75e21f7bc7eb6462560.
* util.c (printllval): Remove align argument.
* defs.h (printllval): Update prototype.
(printllval_aligned, printllval_unaligned): Remove.
* file.c (sys_readahead, sys_truncate64, sys_ftruncate64, sys_fadvise64,
sys_fadvise64_64, sys_sync_file_range, sys_sync_file_range2,
sys_fallocate): Replace printllval_aligned call with printllval.
* io.c (sys_pread, sys_pwrite): Likewise.
(print_llu_from_low_high_val): New function.
(sys_preadv, sys_pwritev): Use it instead of printllval_unaligned.
2014-08-07 04:07:28 +04:00
{
2016-06-17 19:12:13 +03:00
# if SIZEOF_LONG > 4 && SIZEOF_LONG == SIZEOF_LONG_LONG
2015-01-23 23:04:37 +03:00
# if SUPPORTED_PERSONALITIES > 1
2015-11-26 23:29:25 +03:00
# ifdef X86_64
if ( current_personality ! = 1 )
# else
2015-01-23 23:04:37 +03:00
if ( current_wordsize = = sizeof ( long ) )
2015-11-26 23:29:25 +03:00
# endif
2015-01-23 23:04:37 +03:00
# endif
2016-03-30 06:54:21 +03:00
tprintf ( " %ld " , tcp - > u_arg [ arg ] ) ;
2015-01-23 23:04:37 +03:00
# if SUPPORTED_PERSONALITIES > 1
else
2016-03-30 06:54:21 +03:00
tprintf ( " %ld " ,
2015-01-23 23:04:37 +03:00
( ( unsigned long ) tcp - > u_arg [ arg + 1 ] < < current_wordsize * 8 )
| ( unsigned long ) tcp - > u_arg [ arg ] ) ;
# endif
2016-06-17 19:12:13 +03:00
# elif SIZEOF_LONG > 4
# error Unsupported configuration: SIZEOF_LONG > 4 && SIZEOF_LONG_LONG > SIZEOF_LONG
# elif HAVE_STRUCT_TCB_EXT_ARG
# if SUPPORTED_PERSONALITIES > 1
if ( current_personality = = 1 ) {
tprintf ( " %lld " ,
2016-08-23 03:24:10 +03:00
( zero_extend_signed_to_ull ( tcp - > u_arg [ arg + 1 ] ) < < sizeof ( long ) * 8 )
| zero_extend_signed_to_ull ( tcp - > u_arg [ arg ] ) ) ;
2016-06-17 19:12:13 +03:00
} else
Fix preadv/pwritev offset decoding on bigendian architectures
This partially reverts commit 7845a42b39e59e904d01e75e21f7bc7eb6462560.
* util.c (printllval): Remove align argument.
* defs.h (printllval): Update prototype.
(printllval_aligned, printllval_unaligned): Remove.
* file.c (sys_readahead, sys_truncate64, sys_ftruncate64, sys_fadvise64,
sys_fadvise64_64, sys_sync_file_range, sys_sync_file_range2,
sys_fallocate): Replace printllval_aligned call with printllval.
* io.c (sys_pread, sys_pwrite): Likewise.
(print_llu_from_low_high_val): New function.
(sys_preadv, sys_pwritev): Use it instead of printllval_unaligned.
2014-08-07 04:07:28 +04:00
# endif
2016-06-17 19:12:13 +03:00
{
tprintf ( " %lld " , tcp - > ext_arg [ arg ] ) ;
}
# else /* SIZEOF_LONG_LONG > SIZEOF_LONG && !HAVE_STRUCT_TCB_EXT_ARG */
2016-03-30 06:54:21 +03:00
tprintf ( " %lld " ,
2016-08-23 03:24:10 +03:00
( zero_extend_signed_to_ull ( tcp - > u_arg [ arg + 1 ] ) < < sizeof ( long ) * 8 )
| zero_extend_signed_to_ull ( tcp - > u_arg [ arg ] ) ) ;
Fix preadv/pwritev offset decoding on bigendian architectures
This partially reverts commit 7845a42b39e59e904d01e75e21f7bc7eb6462560.
* util.c (printllval): Remove align argument.
* defs.h (printllval): Update prototype.
(printllval_aligned, printllval_unaligned): Remove.
* file.c (sys_readahead, sys_truncate64, sys_ftruncate64, sys_fadvise64,
sys_fadvise64_64, sys_sync_file_range, sys_sync_file_range2,
sys_fallocate): Replace printllval_aligned call with printllval.
* io.c (sys_pread, sys_pwrite): Likewise.
(print_llu_from_low_high_val): New function.
(sys_preadv, sys_pwritev): Use it instead of printllval_unaligned.
2014-08-07 04:07:28 +04:00
# endif
}
2016-05-11 03:42:10 +03:00
# include "xlat/rwf_flags.h"
static int
do_preadv ( struct tcb * tcp , const int flags_arg )
2011-05-12 16:57:40 +04:00
{
if ( entering ( tcp ) ) {
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
2011-09-01 12:00:28 +04:00
tprints ( " , " ) ;
2011-05-12 16:57:40 +04:00
} else {
2016-06-22 16:27:03 +03:00
tprint_iov_upto ( tcp , tcp - > u_arg [ 2 ] , tcp - > u_arg [ 1 ] , IOV_DECODE_STR ,
2016-03-30 21:04:00 +03:00
tcp - > u_rval ) ;
2011-05-12 16:57:40 +04:00
tprintf ( " , %lu, " , tcp - > u_arg [ 2 ] ) ;
2016-03-30 06:54:21 +03:00
print_lld_from_low_high_val ( tcp , 3 ) ;
2016-05-11 03:42:10 +03:00
if ( flags_arg > = 0 ) {
tprints ( " , " ) ;
printflags ( rwf_flags , tcp - > u_arg [ flags_arg ] , " RWF_??? " ) ;
}
2011-05-12 16:57:40 +04:00
}
return 0 ;
}
2016-05-11 03:42:10 +03:00
SYS_FUNC ( preadv )
{
return do_preadv ( tcp , - 1 ) ;
}
SYS_FUNC ( preadv2 )
{
return do_preadv ( tcp , 5 ) ;
}
static int
do_pwritev ( struct tcb * tcp , const int flags_arg )
2011-05-12 16:57:40 +04:00
{
2015-07-20 14:19:30 +03:00
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
tprints ( " , " ) ;
2016-06-22 16:27:03 +03:00
tprint_iov ( tcp , tcp - > u_arg [ 2 ] , tcp - > u_arg [ 1 ] , IOV_DECODE_STR ) ;
2015-07-20 14:19:30 +03:00
tprintf ( " , %lu, " , tcp - > u_arg [ 2 ] ) ;
2016-03-30 06:54:21 +03:00
print_lld_from_low_high_val ( tcp , 3 ) ;
2016-05-11 03:42:10 +03:00
if ( flags_arg > = 0 ) {
tprints ( " , " ) ;
printflags ( rwf_flags , tcp - > u_arg [ flags_arg ] , " RWF_??? " ) ;
}
2015-07-20 14:19:30 +03:00
return RVAL_DECODED ;
2011-05-12 16:57:40 +04:00
}
2016-05-11 03:42:10 +03:00
SYS_FUNC ( pwritev )
{
return do_pwritev ( tcp , - 1 ) ;
}
SYS_FUNC ( pwritev2 )
{
return do_pwritev ( tcp , 5 ) ;
}
2014-04-26 03:30:54 +04:00
# include "xlat/splice_flags.h"
2011-10-11 21:07:05 +04:00
2015-04-07 04:36:50 +03:00
SYS_FUNC ( tee )
2011-10-11 21:07:05 +04:00
{
2015-07-20 14:19:30 +03:00
/* int fd_in */
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
tprints ( " , " ) ;
/* int fd_out */
printfd ( tcp , tcp - > u_arg [ 1 ] ) ;
tprints ( " , " ) ;
/* size_t len */
tprintf ( " %lu, " , tcp - > u_arg [ 2 ] ) ;
/* unsigned int flags */
printflags ( splice_flags , tcp - > u_arg [ 3 ] , " SPLICE_F_??? " ) ;
return RVAL_DECODED ;
2011-10-11 21:07:05 +04:00
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( splice )
2011-10-11 21:07:05 +04:00
{
2015-07-20 14:19:30 +03:00
/* int fd_in */
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
tprints ( " , " ) ;
/* loff_t *off_in */
2016-02-14 01:31:30 +03:00
printnum_int64 ( tcp , tcp - > u_arg [ 1 ] , " % " PRId64 ) ;
2015-07-20 14:19:30 +03:00
tprints ( " , " ) ;
/* int fd_out */
printfd ( tcp , tcp - > u_arg [ 2 ] ) ;
tprints ( " , " ) ;
/* loff_t *off_out */
2016-02-14 01:31:30 +03:00
printnum_int64 ( tcp , tcp - > u_arg [ 3 ] , " % " PRId64 ) ;
2015-07-20 14:19:30 +03:00
tprints ( " , " ) ;
/* size_t len */
tprintf ( " %lu, " , tcp - > u_arg [ 4 ] ) ;
/* unsigned int flags */
printflags ( splice_flags , tcp - > u_arg [ 5 ] , " SPLICE_F_??? " ) ;
return RVAL_DECODED ;
2011-10-11 21:07:05 +04:00
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( vmsplice )
2011-10-11 21:07:05 +04:00
{
2015-07-20 14:19:30 +03:00
/* int fd */
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
tprints ( " , " ) ;
/* const struct iovec *iov, unsigned long nr_segs */
2016-06-22 16:27:03 +03:00
tprint_iov ( tcp , tcp - > u_arg [ 2 ] , tcp - > u_arg [ 1 ] , IOV_DECODE_STR ) ;
2015-07-20 14:19:30 +03:00
tprintf ( " , %lu, " , tcp - > u_arg [ 2 ] ) ;
/* unsigned int flags */
printflags ( splice_flags , tcp - > u_arg [ 3 ] , " SPLICE_F_??? " ) ;
return RVAL_DECODED ;
2011-10-11 21:07:05 +04:00
}