From 2b15a5848e10b1737e26f8908a4e91438209fa23 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Fri, 17 Jul 2015 16:39:54 +0000 Subject: [PATCH] resource.c: make use of RVAL_DECODED * resource.c (sys_setrlimit, sys_getpriority, sys_setpriority): Update for RVAL_DECODED. --- resource.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/resource.c b/resource.c index a121bb03..e3c9a02d 100644 --- a/resource.c +++ b/resource.c @@ -134,12 +134,11 @@ SYS_FUNC(getrlimit) SYS_FUNC(setrlimit) { - if (entering(tcp)) { - printxval(resources, tcp->u_arg[0], "RLIMIT_???"); - tprints(", "); - decode_rlimit(tcp, tcp->u_arg[1]); - } - return 0; + printxval(resources, tcp->u_arg[0], "RLIMIT_???"); + tprints(", "); + decode_rlimit(tcp, tcp->u_arg[1]); + + return RVAL_DECODED; } SYS_FUNC(prlimit64) @@ -271,20 +270,18 @@ SYS_FUNC(osf_getrusage) SYS_FUNC(getpriority) { - if (entering(tcp)) { - printxval(priorities, tcp->u_arg[0], "PRIO_???"); - tprintf(", %lu", tcp->u_arg[1]); - } - return 0; + printxval(priorities, tcp->u_arg[0], "PRIO_???"); + tprintf(", %lu", tcp->u_arg[1]); + + return RVAL_DECODED; } SYS_FUNC(setpriority) { - if (entering(tcp)) { - printxval(priorities, tcp->u_arg[0], "PRIO_???"); - tprintf(", %lu, %ld", tcp->u_arg[1], tcp->u_arg[2]); - } - return 0; + printxval(priorities, tcp->u_arg[0], "PRIO_???"); + tprintf(", %lu, %d", tcp->u_arg[1], (int) tcp->u_arg[2]); + + return RVAL_DECODED; } SYS_FUNC(times) -- 2.40.0