From f36276f52194fd50cee65e76b372653b1cd71b06 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 5 Aug 2018 04:48:56 -0400 Subject: ntux_cmd_strace(): integrated the driver's fdctx. --- src/cmds/ntux_cmd_strace.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cmds/ntux_cmd_strace.c b/src/cmds/ntux_cmd_strace.c index b434189..4f23e39 100644 --- a/src/cmds/ntux_cmd_strace.c +++ b/src/cmds/ntux_cmd_strace.c @@ -19,8 +19,8 @@ int ntux_cmd_strace(const struct ntux_driver_ctx * dctx) { - int32_t status; int ret; + int32_t status; pid_t pid; const char ** argv; const char ** envp; @@ -46,7 +46,9 @@ int ntux_cmd_strace(const struct ntux_driver_ctx * dctx) /* fdlog */ if (logfile) { - if ((fdlog[1] = __sys_open(logfile,O_CREAT|O_TRUNC|O_WRONLY,0)) < 0) + if ((fdlog[1] = __sys_openat( + ntux_driver_fdcwd(dctx), + logfile,O_CREAT|O_TRUNC|O_WRONLY,0)) < 0) if (ntux_errno_set(dctx,fdlog[1])) return NTUX_SYSTEM_ERROR(dctx); } else { -- cgit v1.2.3