From 4c387c5580e2766fe1b5cc878c546089e26a778a Mon Sep 17 00:00:00 2001 From: Ulrich Hecht Date: Thu, 17 Sep 2009 21:08:37 +0300 Subject: [PATCH] linux-user: getpriority errno fix getpriority returned wrong errno; fixes LTP test getpriority02. Signed-off-by: Ulrich Hecht Signed-off-by: Riku Voipio --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 64fd10b..cf5209d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -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)); -- 1.7.9.5