Move umount2 parser to a separate file

* umount.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* system.c: Move sys_umount2 and related code to umount.c.
This commit is contained in:
Дмитрий Левин 2014-12-03 21:09:26 +00:00
parent d28b6a0264
commit 542ca1ef3d
3 changed files with 19 additions and 17 deletions

View File

@ -63,6 +63,7 @@ strace_SOURCES = \
system.c \
term.c \
time.c \
umount.c \
util.c \
v4l2.c \
vsprintf.c

View File

@ -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;
}

18
umount.c Normal file
View File

@ -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;
}