summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/cmds/ntux_cmd_strace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmds/ntux_cmd_strace.c b/src/cmds/ntux_cmd_strace.c
index 08d7eb4..b434189 100644
--- a/src/cmds/ntux_cmd_strace.c
+++ b/src/cmds/ntux_cmd_strace.c
@@ -5,6 +5,8 @@
/***********************************************************/
#include <ntapi/ntapi.h>
+#include <ntapi/nt_termios.h>
+
#include <psxabi/sys_sysapi.h>
#include <psxabi/sys_strace.h>
#include <psxabi/sys_fcntl.h>
@@ -44,7 +46,7 @@ int ntux_cmd_strace(const struct ntux_driver_ctx * dctx)
/* fdlog */
if (logfile) {
- if ((fdlog[1] = __sys_open(logfile,O_CREAT|O_WRONLY,0)) < 0)
+ if ((fdlog[1] = __sys_open(logfile,O_CREAT|O_TRUNC|O_WRONLY,0)) < 0)
if (ntux_errno_set(dctx,fdlog[1]))
return NTUX_SYSTEM_ERROR(dctx);
} else {