file.c: move fallocate parser to a separate file
* fallocate.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_fallocate): Move to fallocate.c.
diff --git a/Makefile.am b/Makefile.am
index d250125..f4e7c77 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,6 +25,7 @@
count.c \
desc.c \
dirent.c \
+ fallocate.c \
fanotify.c \
file.c \
inotify.c \
diff --git a/fallocate.c b/fallocate.c
new file mode 100644
index 0000000..c906cc5
--- /dev/null
+++ b/fallocate.c
@@ -0,0 +1,14 @@
+#include "defs.h"
+
+int
+sys_fallocate(struct tcb *tcp)
+{
+ 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;
+}
diff --git a/file.c b/file.c
index d748db7..70050ff 100644
--- a/file.c
+++ b/file.c
@@ -1913,16 +1913,3 @@
}
return 0;
}
-
-int
-sys_fallocate(struct tcb *tcp)
-{
- 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;
-}