diff --git a/Makefile.am b/Makefile.am index e78e1fe0..f068f7e5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,6 +22,7 @@ strace_SOURCES = \ block.c \ cacheflush.c \ capability.c \ + chdir.c \ chmod.c \ chown.c \ count.c \ diff --git a/chdir.c b/chdir.c new file mode 100644 index 00000000..29f0afc3 --- /dev/null +++ b/chdir.c @@ -0,0 +1,10 @@ +#include "defs.h" + +int +sys_chdir(struct tcb *tcp) +{ + if (entering(tcp)) { + printpath(tcp, tcp->u_arg[0]); + } + return 0; +} diff --git a/file.c b/file.c index 7ba68246..8d0822d9 100644 --- a/file.c +++ b/file.c @@ -1241,13 +1241,3 @@ sys_lxstat(struct tcb *tcp) } #endif /* SPARC[64] */ - -/* directory */ -int -sys_chdir(struct tcb *tcp) -{ - if (entering(tcp)) { - printpath(tcp, tcp->u_arg[0]); - } - return 0; -}