]> granicus.if.org Git - strace/blobdiff - fallocate.c
Remove HAVE_STRUCT_TCB_EXT_ARG, ext_arg, and u_lrval
[strace] / fallocate.c
index c906cc53350e7a66196e831547e2e035a54958ef..b707279c5190af86bee8a75ed8c4abb565db4cfb 100644 (file)
@@ -1,14 +1,28 @@
 #include "defs.h"
 
-int
-sys_fallocate(struct tcb *tcp)
+#ifdef HAVE_LINUX_FALLOC_H
+# include <linux/falloc.h>
+#endif
+
+#include "xlat/falloc_flags.h"
+
+SYS_FUNC(fallocate)
 {
-       if (entering(tcp)) {
-               int argn;
-               printfd(tcp, tcp->u_arg[0]);            /* fd */
-               tprintf(", %#lo, ", tcp->u_arg[1]);     /* mode */
-               argn = printllval(tcp, "%llu, ", 2);    /* offset */
-               printllval(tcp, "%llu", argn);          /* len */
-       }
-       return 0;
+       int argn;
+
+       /* fd */
+       printfd(tcp, tcp->u_arg[0]);
+       tprints(", ");
+
+       /* mode */
+       printflags(falloc_flags, tcp->u_arg[1], "FALLOC_FL_???");
+       tprints(", ");
+
+       /* offset */
+       argn = printllval(tcp, "%lld, ", 2);
+
+       /* len */
+       printllval(tcp, "%lld", argn);
+
+       return RVAL_DECODED;
 }