Fix decoding of timer id returned by timer_create

* time.c (sys_timer_create): The kernel returns a integer, not a
pointer for the timer id in the memory pointed to by timer_id.
This commit is contained in:
Andi Kleen 2011-06-13 21:37:40 +00:00 committed by Dmitry V. Levin
parent 2ea2ab0590
commit 732f39656d

6
time.c
View File

@ -823,12 +823,12 @@ sys_timer_create(struct tcb *tcp)
printsigevent(tcp, tcp->u_arg[1]);
tprintf(", ");
} else {
void *p;
int timer_id;
if (syserror(tcp) || umove(tcp, tcp->u_arg[2], &p) < 0)
if (syserror(tcp) || umove(tcp, tcp->u_arg[2], &timer_id) < 0)
tprintf("%#lx", tcp->u_arg[2]);
else
tprintf("{%p}", p);
tprintf("{%d}", timer_id);
}
return 0;
}