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:
parent
2ea2ab0590
commit
732f39656d
6
time.c
6
time.c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user