]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
linux-user: getpriority errno fix
authorUlrich Hecht <uli@suse.de>
Thu, 17 Sep 2009 18:08:37 +0000 (21:08 +0300)
committerRiku Voipio <riku.voipio@iki.fi>
Thu, 15 Oct 2009 20:55:55 +0000 (23:55 +0300)
getpriority returned wrong errno; fixes LTP test getpriority02.

Signed-off-by: Ulrich Hecht <uli@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user/syscall.c

index d07c381f02f01d44727d77463dbe1fb4307c4a19..baf00e0bf9ae7506c975f080324b63c67a6fd035 100644 (file)
@@ -5311,7 +5311,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         /* libc does special remapping of the return value of
          * sys_getpriority() so it's just easiest to call
          * sys_getpriority() directly rather than through libc. */
-        ret = sys_getpriority(arg1, arg2);
+        ret = get_errno(sys_getpriority(arg1, arg2));
         break;
     case TARGET_NR_setpriority:
         ret = get_errno(setpriority(arg1, arg2, arg3));