]> granicus.if.org Git - strace/commitdiff
Move umount2 parser to a separate file
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 3 Dec 2014 21:09:26 +0000 (21:09 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 4 Dec 2014 02:23:40 +0000 (02:23 +0000)
* umount.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* system.c: Move sys_umount2 and related code to umount.c.

Makefile.am
system.c
umount.c [new file with mode: 0644]

index 707f486080b7d38b91721798d0daf2481adbf6f1..e6dff3eac8c9596a30607ac59e4ee545d51ec4df 100644 (file)
@@ -63,6 +63,7 @@ strace_SOURCES =      \
        system.c        \
        term.c          \
        time.c          \
+       umount.c        \
        util.c          \
        v4l2.c          \
        vsprintf.c
index 91a471bc5c2cdecbc1a8feb20e8a48ee131a9a5b..fe07cf57b4bece171aa97809b576be9f65673d6a 100644 (file)
--- a/system.c
+++ b/system.c
@@ -100,20 +100,3 @@ sys_mount(struct tcb *tcp)
        }
        return 0;
 }
-
-#define MNT_FORCE      0x00000001      /* Attempt to forcibily umount */
-#define MNT_DETACH     0x00000002      /* Just detach from the tree */
-#define MNT_EXPIRE     0x00000004      /* Mark for expiry */
-
-#include "xlat/umount_flags.h"
-
-int
-sys_umount2(struct tcb *tcp)
-{
-       if (entering(tcp)) {
-               printstr(tcp, tcp->u_arg[0], -1);
-               tprints(", ");
-               printflags(umount_flags, tcp->u_arg[1], "MNT_???");
-       }
-       return 0;
-}
diff --git a/umount.c b/umount.c
new file mode 100644 (file)
index 0000000..ca5037f
--- /dev/null
+++ b/umount.c
@@ -0,0 +1,18 @@
+#include "defs.h"
+
+#define MNT_FORCE      0x00000001      /* Attempt to forcibily umount */
+#define MNT_DETACH     0x00000002      /* Just detach from the tree */
+#define MNT_EXPIRE     0x00000004      /* Mark for expiry */
+
+#include "xlat/umount_flags.h"
+
+int
+sys_umount2(struct tcb *tcp)
+{
+       if (entering(tcp)) {
+               printstr(tcp, tcp->u_arg[0], -1);
+               tprints(", ");
+               printflags(umount_flags, tcp->u_arg[1], "MNT_???");
+       }
+       return 0;
+}