blob: 0b1cfec995e973f453906bf676b7fe82e26f50b3 [file] [log] [blame]
Dmitry V. Levin2795a5f2014-12-06 03:53:16 +00001#include "defs.h"
2
Dmitry V. Levin52572b62014-12-11 19:21:54 +00003#ifdef HAVE_LINUX_FALLOC_H
4# include <linux/falloc.h>
5#endif
6
7#include "xlat/falloc_flags.h"
8
Dmitry V. Levina0bd3742015-04-07 01:36:50 +00009SYS_FUNC(fallocate)
Dmitry V. Levin2795a5f2014-12-06 03:53:16 +000010{
Dmitry V. Levin5dcf3b12015-07-20 13:53:38 +000011 int argn;
Dmitry V. Levin52572b62014-12-11 19:21:54 +000012
Dmitry V. Levin5dcf3b12015-07-20 13:53:38 +000013 /* fd */
14 printfd(tcp, tcp->u_arg[0]);
15 tprints(", ");
Dmitry V. Levin52572b62014-12-11 19:21:54 +000016
Dmitry V. Levin5dcf3b12015-07-20 13:53:38 +000017 /* mode */
18 printflags(falloc_flags, tcp->u_arg[1], "FALLOC_FL_???");
19 tprints(", ");
Dmitry V. Levin52572b62014-12-11 19:21:54 +000020
Dmitry V. Levin5dcf3b12015-07-20 13:53:38 +000021 /* offset */
22 argn = printllval(tcp, "%llu, ", 2);
Dmitry V. Levin52572b62014-12-11 19:21:54 +000023
Dmitry V. Levin5dcf3b12015-07-20 13:53:38 +000024 /* len */
25 printllval(tcp, "%llu", argn);
26
27 return RVAL_DECODED;
Dmitry V. Levin2795a5f2014-12-06 03:53:16 +000028}