blob: 06df82d26adc7699dbf1bc1ddf2119f8b2553a63 [file] [log] [blame]
Dmitry V. Levin63f28dd2014-12-06 03:53:16 +00001#include "defs.h"
2
3#include <fcntl.h>
4
5#include "xlat/advise.h"
6
Dmitry V. Levina0bd3742015-04-07 01:36:50 +00007SYS_FUNC(fadvise64)
Dmitry V. Levin63f28dd2014-12-06 03:53:16 +00008{
Dmitry V. Levin429c6772015-07-20 13:55:47 +00009 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. Levin63f28dd2014-12-06 03:53:16 +000017}
18
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000019SYS_FUNC(fadvise64_64)
Dmitry V. Levin63f28dd2014-12-06 03:53:16 +000020{
Dmitry V. Levin429c6772015-07-20 13:55:47 +000021 int argn;
22
23 printfd(tcp, tcp->u_arg[0]);
24 argn = printllval(tcp, ", %lld, ", 1);
25 argn = printllval(tcp, "%lld, ", argn);
Dmitry V. Levin63f28dd2014-12-06 03:53:16 +000026#if defined __ARM_EABI__ || defined AARCH64 || defined POWERPC || defined XTENSA
Dmitry V. Levin429c6772015-07-20 13:55:47 +000027 printxval(advise, tcp->u_arg[1], "POSIX_FADV_???");
Dmitry V. Levin63f28dd2014-12-06 03:53:16 +000028#else
Dmitry V. Levin429c6772015-07-20 13:55:47 +000029 printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???");
Dmitry V. Levin63f28dd2014-12-06 03:53:16 +000030#endif
Dmitry V. Levin429c6772015-07-20 13:55:47 +000031
32 return RVAL_DECODED;
Dmitry V. Levin63f28dd2014-12-06 03:53:16 +000033}