* getcwd.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c (sys_getcwd): Move to getcwd.c.
fallocate.c \
fanotify.c \
file.c \
+ getcwd.c \
inotify.c \
io.c \
ioctl.c \
print_dirfd(tcp, tcp->u_arg[0]);
return decode_mknod(tcp, 1);
}
-
-int
-sys_getcwd(struct tcb *tcp)
-{
- if (exiting(tcp)) {
- if (syserror(tcp))
- tprintf("%#lx", tcp->u_arg[0]);
- else
- printpathn(tcp, tcp->u_arg[0], tcp->u_rval - 1);
- tprintf(", %lu", tcp->u_arg[1]);
- }
- return 0;
-}
--- /dev/null
+#include "defs.h"
+
+int
+sys_getcwd(struct tcb *tcp)
+{
+ if (exiting(tcp)) {
+ if (syserror(tcp))
+ tprintf("%#lx", tcp->u_arg[0]);
+ else
+ printpathn(tcp, tcp->u_arg[0], tcp->u_rval - 1);
+ tprintf(", %lu", tcp->u_arg[1]);
+ }
+ return 0;
+}