Dmitry V. Levin | 63f28dd | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 1 | #include "defs.h" |
| 2 | |
| 3 | #include <fcntl.h> |
| 4 | |
| 5 | #include "xlat/advise.h" |
| 6 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame^] | 7 | SYS_FUNC(fadvise64) |
Dmitry V. Levin | 63f28dd | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 8 | { |
| 9 | if (entering(tcp)) { |
| 10 | int argn; |
| 11 | printfd(tcp, tcp->u_arg[0]); |
| 12 | argn = printllval(tcp, ", %lld", 1); |
| 13 | tprintf(", %ld, ", tcp->u_arg[argn++]); |
| 14 | printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???"); |
| 15 | } |
| 16 | return 0; |
| 17 | } |
| 18 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame^] | 19 | SYS_FUNC(fadvise64_64) |
Dmitry V. Levin | 63f28dd | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 20 | { |
| 21 | if (entering(tcp)) { |
| 22 | int argn; |
| 23 | printfd(tcp, tcp->u_arg[0]); |
| 24 | argn = printllval(tcp, ", %lld, ", 1); |
| 25 | argn = printllval(tcp, "%lld, ", argn); |
| 26 | #if defined __ARM_EABI__ || defined AARCH64 || defined POWERPC || defined XTENSA |
| 27 | printxval(advise, tcp->u_arg[1], "POSIX_FADV_???"); |
| 28 | #else |
| 29 | printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???"); |
| 30 | #endif |
| 31 | } |
| 32 | return 0; |
| 33 | } |