sysinfo.c: use umove_or_printaddr

* sysinfo.c (sys_sysinfo): Use umove_or_printaddr.
This commit is contained in:
Дмитрий Левин 2015-07-16 22:08:02 +00:00
parent 279df2cc75
commit be6d79146c

View File

@ -8,10 +8,7 @@ SYS_FUNC(sysinfo)
if (entering(tcp))
return 0;
if (syserror(tcp) || !verbose(tcp) ||
umove(tcp, tcp->u_arg[0], &si) < 0) {
tprintf("%#lx", tcp->u_arg[0]);
} else {
if (!umove_or_printaddr(tcp, tcp->u_arg[0], &si)) {
tprintf("{uptime=%llu"
", loads=[%llu, %llu, %llu]"
", totalram=%llu"