On Wed, 2007-09-26 at 14:06 -0600, Thayne Harbaugh wrote:
> The linux-user getpriority() syscall goes through the libc wrapper.
> This causes a problem because the libc wrapper remaps the return value
> from the kernel.  This patch calls the kernel getpriority syscall
> directly.

I didn't see any discussion about this nor did I see it committed.  Were
there any concerns or objections?  It fixes several failures in the LTP
test suite.

The bug is that the kernel returns -1 on error and 1-40 on success - the
libc wrapper remaps this to -1 or error and -20 - 19 on succes (errno
must be cleared and checked for the -1 case to determine if there was an
error).  If qemu uses the libc wrapper then the return value is aleady
remapped to negative numbers - which appear to be errors.




Reply via email to