From patchwork Fri Oct 16 12:38:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [9/9] linux-user: getpriority errno fix From: Ulrich Hecht X-Patchwork-Id: 36204 Message-Id: <1255696735-21396-10-git-send-email-uli@suse.de> To: qemu-devel@nongnu.org Cc: riku.voipio@iki.fi, agraf@suse.de Date: Fri, 16 Oct 2009 14:38:55 +0200 getpriority returned wrong errno; fixes LTP test getpriority02. Signed-off-by: Ulrich Hecht --- linux-user/syscall.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index da6f2e1..455c3fd 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5314,7 +5314,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));