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
}
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
2012-04-28 16:26:18 +04:00
tprint_iov_upto ( struct tcb * tcp , unsigned long len , unsigned long addr , int 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 ] ;
2005-06-01 23:22:06 +04:00
unsigned long size , cur , end , abbrev_end ;
2015-09-15 05:17:32 +03:00
const unsigned long sizeof_iov = current_wordsize * 2 ;
2000-09-02 01:03:06 +04:00
if ( ! len ) {
2011-09-01 12:00:28 +04:00
tprints ( " [] " ) ;
2000-09-02 01:03:06 +04:00
return ;
}
2006-12-13 20:08:08 +03:00
size = len * sizeof_iov ;
2005-06-01 23:22:06 +04:00
end = addr + size ;
2015-07-20 14:06:54 +03:00
if ( ! verbose ( tcp ) | | ( exiting ( tcp ) & & syserror ( tcp ) ) | |
! addr | | size / sizeof_iov ! = len | | end < addr ) {
printaddr ( addr ) ;
2000-09-02 01:03:06 +04:00
return ;
}
2005-06-01 23:22:06 +04:00
if ( abbrev ( tcp ) ) {
2006-12-13 20:08:08 +03:00
abbrev_end = addr + max_strlen * sizeof_iov ;
2005-06-01 23:22:06 +04:00
if ( abbrev_end < addr )
abbrev_end = end ;
2000-09-02 01:03:06 +04:00
} else {
2005-06-01 23:22:06 +04:00
abbrev_end = end ;
}
2016-03-30 05:22:58 +03:00
if ( addr > = abbrev_end ) {
tprints ( " [...] " ) ;
return ;
}
2006-12-13 20:08:08 +03:00
for ( cur = addr ; cur < end ; cur + = sizeof_iov ) {
2016-03-30 05:22:58 +03:00
if ( cur > addr ) {
2011-09-01 12:00:28 +04:00
tprints ( " , " ) ;
2016-03-30 05:22:58 +03:00
if ( cur > = abbrev_end ) {
tprints ( " ... " ) ;
break ;
}
2005-06-01 23:22:06 +04:00
}
2015-09-15 05:17:32 +03:00
if ( umove_ulong_array_or_printaddr ( tcp , cur , iov ,
ARRAY_SIZE ( iov ) ) )
2005-06-01 23:22:06 +04:00
break ;
2016-03-30 05:22:58 +03:00
if ( cur < = addr )
tprints ( " [ " ) ;
2011-09-01 12:00:28 +04:00
tprints ( " { " ) ;
2012-04-28 16:26:18 +04:00
if ( decode_iov ) {
2015-09-15 05:17:32 +03:00
unsigned long len = iov [ 1 ] ;
2012-04-28 16:26:18 +04:00
if ( len > data_size )
len = data_size ;
data_size - = len ;
2015-09-15 05:17:32 +03:00
printstr ( tcp , iov [ 0 ] , len ) ;
2012-04-28 16:26:18 +04:00
} else
2015-09-15 05:17:32 +03:00
printaddr ( iov [ 0 ] ) ;
tprintf ( " , %lu} " , iov [ 1 ] ) ;
2000-09-02 01:03:06 +04:00
}
2016-03-30 05:22:58 +03:00
if ( cur > addr )
tprints ( " ] " ) ;
2000-09-02 01:03:06 +04:00
}
2012-04-28 16:26:18 +04:00
void
tprint_iov ( struct tcb * tcp , unsigned long len , unsigned long addr , int decode_iov )
{
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-01-20 03:17:02 +03:00
tprint_iov_upto ( tcp , tcp - > u_arg [ 2 ] , tcp - > u_arg [ 1 ] , 1 ,
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 ( " , " ) ;
tprint_iov ( tcp , tcp - > u_arg [ 2 ] , tcp - > u_arg [ 1 ] , 1 ) ;
tprintf ( " , %lu " , tcp - > u_arg [ 2 ] ) ;
return RVAL_DECODED ;
1999-02-19 03:21:36 +03:00
}
2003-08-21 13:58:00 +04:00
/* The SH4 ABI does allow long longs in odd-numbered registers, but
does not allow them to be split between registers and memory - and
there are only four argument registers for normal functions . As a
result pread takes an extra padding argument before the offset . This
was changed late in the 2.4 series ( around 2.4 .20 ) . */
# if defined(SH)
# define PREAD_OFFSET_ARG 4
# else
# define PREAD_OFFSET_ARG 3
# endif
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-04-02 04:08:24 +03:00
printllval ( tcp , " %lld " , PREAD_OFFSET_ARG ) ;
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-04-02 04:08:24 +03:00
printllval ( tcp , " %lld " , PREAD_OFFSET_ARG ) ;
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
{
# if 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
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
# else
# ifdef X32
if ( current_personality = = 0 )
2016-03-30 06:54:21 +03:00
tprintf ( " %lld " , tcp - > ext_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
else
# endif
2016-03-30 06:54:21 +03:00
tprintf ( " %lld " ,
2014-08-07 15:42:46 +04:00
( ( unsigned long long ) ( unsigned long ) tcp - > u_arg [ arg + 1 ] < < sizeof ( long ) * 8 )
| ( unsigned long long ) ( unsigned long ) 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
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( preadv )
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-03-30 21:04:00 +03:00
tprint_iov_upto ( tcp , tcp - > u_arg [ 2 ] , tcp - > u_arg [ 1 ] , 1 ,
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 ) ;
2011-05-12 16:57:40 +04:00
}
return 0 ;
}
2015-04-07 04:36:50 +03:00
SYS_FUNC ( pwritev )
2011-05-12 16:57:40 +04:00
{
2015-07-20 14:19:30 +03:00
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
tprints ( " , " ) ;
tprint_iov ( tcp , tcp - > u_arg [ 2 ] , tcp - > u_arg [ 1 ] , 1 ) ;
tprintf ( " , %lu, " , tcp - > u_arg [ 2 ] ) ;
2016-03-30 06:54:21 +03:00
print_lld_from_low_high_val ( tcp , 3 ) ;
2015-07-20 14:19:30 +03:00
return RVAL_DECODED ;
2011-05-12 16:57:40 +04:00
}
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 */
tprint_iov ( tcp , tcp - > u_arg [ 2 ] , tcp - > u_arg [ 1 ] , 1 ) ;
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
}