* syscalls.cc (lseek): Fix debug output.

This commit is contained in:
Corinna Vinschen 2012-03-20 20:39:32 +00:00
parent 8ea7221511
commit c1c62a1368
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2012-03-20 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (lseek): Fix debug output.
2012-03-20 Christian Franke <franke@computer.org>
* ntdll.h (SharedUserData): Add volatile qualifier. This fixes a

View File

@ -1344,7 +1344,10 @@ lseek64 (int fd, _off64_t pos, int dir)
else
res = -1;
}
syscall_printf ("%R = lseek(%d, %D, %d)", res, fd, pos, dir);
/* Can't use %R here since res is 8 bytes */
syscall_printf (res == -1 ? "%D = lseek(%d, %D, %d), errno %d"
: "%D = lseek(%d, %D, %d)",
res, fd, pos, dir, get_errno ());
return res;
}