From c9a199278bda38799fcf1eda38364b4c5b201cc9 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 16 Jul 2015 21:21:09 +0000 Subject: [PATCH] utimes.c: make use of RVAL_DECODED * utimes.c (decode_utimes): Change to return void. Update for RVAL_DECODED. (sys_utimes, sys_futimesat, sys_utimensat, sys_osf_utimes): Update callers. Update for RVAL_DECODED. --- utimes.c | 64 +++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/utimes.c b/utimes.c index 4c995a59..e3a93392 100644 --- a/utimes.c +++ b/utimes.c @@ -1,58 +1,56 @@ #include "defs.h" -static int +static void decode_utimes(struct tcb *tcp, int offset, int special) { - if (entering(tcp)) { - printpath(tcp, tcp->u_arg[offset]); + printpath(tcp, tcp->u_arg[offset]); + tprints(", "); + if (tcp->u_arg[offset + 1] == 0) + tprints("NULL"); + else { + tprints("["); + printtv_bitness(tcp, tcp->u_arg[offset + 1], + BITNESS_CURRENT, special); tprints(", "); - if (tcp->u_arg[offset + 1] == 0) - tprints("NULL"); - else { - tprints("["); - printtv_bitness(tcp, tcp->u_arg[offset + 1], - BITNESS_CURRENT, special); - tprints(", "); - printtv_bitness(tcp, tcp->u_arg[offset + 1] - + sizeof(struct timeval), - BITNESS_CURRENT, special); - tprints("]"); - } + printtv_bitness(tcp, tcp->u_arg[offset + 1] + + sizeof(struct timeval), + BITNESS_CURRENT, special); + tprints("]"); } - return 0; } SYS_FUNC(utimes) { - return decode_utimes(tcp, 0, 0); + decode_utimes(tcp, 0, 0); + + return RVAL_DECODED; } SYS_FUNC(futimesat) { - if (entering(tcp)) - print_dirfd(tcp, tcp->u_arg[0]); - return decode_utimes(tcp, 1, 0); + print_dirfd(tcp, tcp->u_arg[0]); + decode_utimes(tcp, 1, 0); + + return RVAL_DECODED; } SYS_FUNC(utimensat) { - if (entering(tcp)) { - print_dirfd(tcp, tcp->u_arg[0]); - decode_utimes(tcp, 1, 1); - tprints(", "); - printflags(at_flags, tcp->u_arg[3], "AT_???"); - } - return 0; + print_dirfd(tcp, tcp->u_arg[0]); + decode_utimes(tcp, 1, 1); + tprints(", "); + printflags(at_flags, tcp->u_arg[3], "AT_???"); + + return RVAL_DECODED; } #ifdef ALPHA SYS_FUNC(osf_utimes) { - if (entering(tcp)) { - printpath(tcp, tcp->u_arg[0]); - tprints(", "); - printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32, 0); - } - return 0; + printpath(tcp, tcp->u_arg[0]); + tprints(", "); + printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32, 0); + + return RVAL_DECODED; } #endif /* ALPHA */