Fix decoding of times syscall return value
Always print return value of successful times syscall as unsigned long integer. * times.c (sys_times): Return RVAL_UDECIMAL unless syserror.
This commit is contained in:
parent
3585b06f79
commit
d8ef5e70db
22
times.c
22
times.c
@ -5,15 +5,17 @@ SYS_FUNC(times)
|
||||
{
|
||||
struct tms tbuf;
|
||||
|
||||
if (exiting(tcp)) {
|
||||
if (!umove_or_printaddr(tcp, tcp->u_arg[0], &tbuf)) {
|
||||
tprintf("{tms_utime=%llu, tms_stime=%llu, ",
|
||||
(unsigned long long) tbuf.tms_utime,
|
||||
(unsigned long long) tbuf.tms_stime);
|
||||
tprintf("tms_cutime=%llu, tms_cstime=%llu}",
|
||||
(unsigned long long) tbuf.tms_cutime,
|
||||
(unsigned long long) tbuf.tms_cstime);
|
||||
}
|
||||
if (entering(tcp))
|
||||
return 0;
|
||||
|
||||
if (!umove_or_printaddr(tcp, tcp->u_arg[0], &tbuf)) {
|
||||
tprintf("{tms_utime=%llu, tms_stime=%llu, ",
|
||||
(unsigned long long) tbuf.tms_utime,
|
||||
(unsigned long long) tbuf.tms_stime);
|
||||
tprintf("tms_cutime=%llu, tms_cstime=%llu}",
|
||||
(unsigned long long) tbuf.tms_cutime,
|
||||
(unsigned long long) tbuf.tms_cstime);
|
||||
}
|
||||
return 0;
|
||||
|
||||
return syserror(tcp) ? RVAL_DECIMAL : RVAL_UDECIMAL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user