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 | { |
Dmitry V. Levin | 429c677 | 2015-07-20 13:55:47 +0000 | [diff] [blame] | 9 | int argn; |
| 10 | |
| 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 RVAL_DECODED; |
Dmitry V. Levin | 63f28dd | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 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 | { |
Dmitry V. Levin | 429c677 | 2015-07-20 13:55:47 +0000 | [diff] [blame] | 21 | int argn; |
| 22 | |
| 23 | printfd(tcp, tcp->u_arg[0]); |
| 24 | argn = printllval(tcp, ", %lld, ", 1); |
| 25 | argn = printllval(tcp, "%lld, ", argn); |
Dmitry V. Levin | 63f28dd | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 26 | #if defined __ARM_EABI__ || defined AARCH64 || defined POWERPC || defined XTENSA |
Dmitry V. Levin | 429c677 | 2015-07-20 13:55:47 +0000 | [diff] [blame] | 27 | printxval(advise, tcp->u_arg[1], "POSIX_FADV_???"); |
Dmitry V. Levin | 63f28dd | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 28 | #else |
Dmitry V. Levin | 429c677 | 2015-07-20 13:55:47 +0000 | [diff] [blame] | 29 | printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???"); |
Dmitry V. Levin | 63f28dd | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 30 | #endif |
Dmitry V. Levin | 429c677 | 2015-07-20 13:55:47 +0000 | [diff] [blame] | 31 | |
| 32 | return RVAL_DECODED; |
Dmitry V. Levin | 63f28dd | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 33 | } |