From d62d8fd671a84a758ee8d8d6556a53ddfebfa899 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Fri, 17 Jul 2015 22:03:29 +0000 Subject: [PATCH] open.c: make use of RVAL_DECODED * open.c (decode_open, sys_creat): Update for RVAL_DECODED. --- open.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/open.c b/open.c index 4a70d89c..828cd6a2 100644 --- a/open.c +++ b/open.c @@ -84,17 +84,16 @@ tprint_open_modes(int flags) static int decode_open(struct tcb *tcp, int offset) { - if (entering(tcp)) { - printpath(tcp, tcp->u_arg[offset]); - tprints(", "); - /* flags */ - tprint_open_modes(tcp->u_arg[offset + 1]); - if (tcp->u_arg[offset + 1] & O_CREAT) { - /* mode */ - tprintf(", %#lo", tcp->u_arg[offset + 2]); - } + printpath(tcp, tcp->u_arg[offset]); + tprints(", "); + /* flags */ + tprint_open_modes(tcp->u_arg[offset + 1]); + if (tcp->u_arg[offset + 1] & O_CREAT) { + /* mode */ + tprintf(", %#lo", tcp->u_arg[offset + 2]); } - return RVAL_FD; + + return RVAL_DECODED | RVAL_FD; } SYS_FUNC(open) @@ -111,9 +110,8 @@ SYS_FUNC(openat) SYS_FUNC(creat) { - if (entering(tcp)) { - printpath(tcp, tcp->u_arg[0]); - tprintf(", %#lo", tcp->u_arg[1]); - } - return RVAL_FD; + printpath(tcp, tcp->u_arg[0]); + tprintf(", %#lo", tcp->u_arg[1]); + + return RVAL_DECODED | RVAL_FD; } -- 2.40.0