From d590f3cdd8cfec9e0be01fa6e7146fbc8674ae84 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 6 Dec 2014 03:53:16 +0000 Subject: [PATCH] file.c: move umask parser to a separate file * umask.c: New file. * Makefile.am (strace_SOURCES): Add it. * file.c (sys_umask): Move to umask.c. --- Makefile.am | 1 + file.c | 9 --------- umask.c | 10 ++++++++++ 3 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 umask.c diff --git a/Makefile.am b/Makefile.am index 47b90a20..79f9b1be 100644 --- a/Makefile.am +++ b/Makefile.am @@ -79,6 +79,7 @@ strace_SOURCES = \ term.c \ time.c \ truncate.c \ + umask.c \ umount.c \ util.c \ utime.c \ diff --git a/file.c b/file.c index 23c0e15c..9e90e5a6 100644 --- a/file.c +++ b/file.c @@ -356,15 +356,6 @@ sys_faccessat(struct tcb *tcp) return decode_access(tcp, 1); } -int -sys_umask(struct tcb *tcp) -{ - if (entering(tcp)) { - tprintf("%#lo", tcp->u_arg[0]); - } - return RVAL_OCTAL; -} - /* several stats */ #if defined(SPARC) || defined(SPARC64) diff --git a/umask.c b/umask.c new file mode 100644 index 00000000..cc00cc6a --- /dev/null +++ b/umask.c @@ -0,0 +1,10 @@ +#include "defs.h" + +int +sys_umask(struct tcb *tcp) +{ + if (entering(tcp)) { + tprintf("%#lo", tcp->u_arg[0]); + } + return RVAL_OCTAL; +} -- 2.34.1