Fix nanosleep decoding: second argument was not shown after success

* time.c (sys_nanosleep): Fix bug - inverted is_restart_error() check.
* syscall.c (is_restart_error): Remove redundant check.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2012-01-28 02:16:06 +01:00
parent 3af224c5cd
commit ea051f7533
2 changed files with 1 additions and 3 deletions

View File

@ -716,8 +716,6 @@ int
is_restart_error(struct tcb *tcp)
{
#ifdef LINUX
if (!syserror(tcp))
return 0;
switch (tcp->u_error) {
case ERESTARTSYS:
case ERESTARTNOINTR:

2
time.c
View File

@ -271,7 +271,7 @@ sys_nanosleep(struct tcb *tcp)
print_timespec(tcp, tcp->u_arg[0]);
tprints(", ");
} else {
if (!tcp->u_arg[1] || is_restart_error(tcp))
if (!tcp->u_arg[1] || !is_restart_error(tcp))
print_timespec(tcp, tcp->u_arg[1]);
else
tprintf("%#lx", tcp->u_arg[1]);