From: Dmitry V. Levin Date: Sun, 6 Dec 2015 01:36:28 +0000 (+0000) Subject: mips n32, x32: fix printing of times syscall return value X-Git-Tag: v4.11~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb509aafb613ac7c069e9e3f7b61fdd52b1ec5c3;p=strace mips n32, x32: fix printing of times syscall return value As times syscall returns kernel's long value, it has to be printed as RVAL_LUDECIMAL on systems where long type is less than kernel's long. * times.c (SYS_FUNC(times)) [RVAL_LUDECIMAL && !IN_MPERS]: Return RVAL_LUDECIMAL instead of RVAL_UDECIMAL. --- diff --git a/times.c b/times.c index 23a77473..be239501 100644 --- a/times.c +++ b/times.c @@ -12,13 +12,18 @@ SYS_FUNC(times) return 0; if (!umove_or_printaddr(tcp, tcp->u_arg[0], &tbuf)) { - tprintf("{tms_utime=%llu, tms_stime=%llu, ", + tprintf("{tms_utime=%Lu, tms_stime=%Lu, ", (unsigned long long) tbuf.tms_utime, (unsigned long long) tbuf.tms_stime); - tprintf("tms_cutime=%llu, tms_cstime=%llu}", + tprintf("tms_cutime=%Lu, tms_cstime=%Lu}", (unsigned long long) tbuf.tms_cutime, (unsigned long long) tbuf.tms_cstime); } - return syserror(tcp) ? RVAL_DECIMAL : RVAL_UDECIMAL; + return syserror(tcp) ? RVAL_DECIMAL : +#if defined(RVAL_LUDECIMAL) && !defined(IN_MPERS) + RVAL_LUDECIMAL; +#else + RVAL_UDECIMAL; +#endif }