2015-08-18 22:09:30 +00:00
/*
* Copyright ( c ) 2015 Dmitry V . Levin < ldv @ altlinux . org >
2018-12-24 23:46:43 +00:00
* Copyright ( c ) 2015 - 2018 The strace developers .
2015-08-18 22:09:30 +00:00
* All rights reserved .
*
2018-12-10 00:00:00 +00:00
* SPDX - License - Identifier : LGPL - 2.1 - or - later
2015-08-18 22:09:30 +00:00
*/
# include "defs.h"
SYS_FUNC ( sendfile64 )
{
2015-08-18 22:17:52 +00:00
if ( entering ( tcp ) ) {
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
tprints ( " , " ) ;
printfd ( tcp , tcp - > u_arg [ 1 ] ) ;
tprints ( " , " ) ;
if ( ! printnum_int64 ( tcp , tcp - > u_arg [ 2 ] , " % " PRIu64 ) ) {
2016-12-26 10:16:35 +00:00
tprintf ( " , % " PRI_klu , tcp - > u_arg [ 3 ] ) ;
2015-08-18 22:17:52 +00:00
return RVAL_DECODED ;
}
} else {
if ( ! syserror ( tcp ) & & tcp - > u_rval ) {
tprints ( " => " ) ;
printnum_int64 ( tcp , tcp - > u_arg [ 2 ] , " % " PRIu64 ) ;
}
2016-12-26 10:16:35 +00:00
tprintf ( " , % " PRI_klu , tcp - > u_arg [ 3 ] ) ;
2015-08-18 22:17:52 +00:00
}
2015-08-18 22:09:30 +00:00
2015-08-18 22:17:52 +00:00
return 0 ;
2015-08-18 22:09:30 +00:00
}
SYS_FUNC ( sendfile )
{
2015-08-18 22:17:52 +00:00
if ( entering ( tcp ) ) {
printfd ( tcp , tcp - > u_arg [ 0 ] ) ;
tprints ( " , " ) ;
printfd ( tcp , tcp - > u_arg [ 1 ] ) ;
tprints ( " , " ) ;
if ( ! printnum_ulong ( tcp , tcp - > u_arg [ 2 ] )
| | ! tcp - > u_arg [ 3 ] ) {
2016-12-26 10:16:35 +00:00
tprintf ( " , % " PRI_klu , tcp - > u_arg [ 3 ] ) ;
2015-08-18 22:17:52 +00:00
return RVAL_DECODED ;
}
} else {
if ( ! syserror ( tcp ) & & tcp - > u_rval ) {
tprints ( " => " ) ;
printnum_ulong ( tcp , tcp - > u_arg [ 2 ] ) ;
}
2016-12-26 10:16:35 +00:00
tprintf ( " , % " PRI_klu , tcp - > u_arg [ 3 ] ) ;
2015-08-18 22:17:52 +00:00
}
2015-08-18 22:09:30 +00:00
2015-08-18 22:17:52 +00:00
return 0 ;
2015-08-18 22:09:30 +00:00
}