Dmitry V. Levin | 2795a5f | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 1 | #include "defs.h" |
| 2 | |
Dmitry V. Levin | 52572b6 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 3 | #ifdef HAVE_LINUX_FALLOC_H |
| 4 | # include <linux/falloc.h> |
| 5 | #endif |
| 6 | |
| 7 | #include "xlat/falloc_flags.h" |
| 8 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 9 | SYS_FUNC(fallocate) |
Dmitry V. Levin | 2795a5f | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 10 | { |
Dmitry V. Levin | 5dcf3b1 | 2015-07-20 13:53:38 +0000 | [diff] [blame] | 11 | int argn; |
Dmitry V. Levin | 52572b6 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 12 | |
Dmitry V. Levin | 5dcf3b1 | 2015-07-20 13:53:38 +0000 | [diff] [blame] | 13 | /* fd */ |
| 14 | printfd(tcp, tcp->u_arg[0]); |
| 15 | tprints(", "); |
Dmitry V. Levin | 52572b6 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 16 | |
Dmitry V. Levin | 5dcf3b1 | 2015-07-20 13:53:38 +0000 | [diff] [blame] | 17 | /* mode */ |
| 18 | printflags(falloc_flags, tcp->u_arg[1], "FALLOC_FL_???"); |
| 19 | tprints(", "); |
Dmitry V. Levin | 52572b6 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 20 | |
Dmitry V. Levin | 5dcf3b1 | 2015-07-20 13:53:38 +0000 | [diff] [blame] | 21 | /* offset */ |
| 22 | argn = printllval(tcp, "%llu, ", 2); |
Dmitry V. Levin | 52572b6 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 23 | |
Dmitry V. Levin | 5dcf3b1 | 2015-07-20 13:53:38 +0000 | [diff] [blame] | 24 | /* len */ |
| 25 | printllval(tcp, "%llu", argn); |
| 26 | |
| 27 | return RVAL_DECODED; |
Dmitry V. Levin | 2795a5f | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 28 | } |