file.c: move chdir parser to a separate file

* chdir.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_chdir): Move to chdir.c.
This commit is contained in:
Дмитрий Левин 2014-12-06 03:53:16 +00:00
parent 231b19fca0
commit 9b2f674adb
3 changed files with 11 additions and 10 deletions

View File

@ -22,6 +22,7 @@ strace_SOURCES = \
block.c \
cacheflush.c \
capability.c \
chdir.c \
chmod.c \
chown.c \
count.c \

10
chdir.c Normal file
View File

@ -0,0 +1,10 @@
#include "defs.h"
int
sys_chdir(struct tcb *tcp)
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
}
return 0;
}

10
file.c
View File

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