From patchwork Wed Oct 21 13:52:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 36604 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DE1DFB7BB5 for ; Thu, 22 Oct 2009 02:03:26 +1100 (EST) Received: from localhost ([127.0.0.1]:43795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0cih-00017d-Ms for incoming@patchwork.ozlabs.org; Wed, 21 Oct 2009 11:03:23 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0bbs-0005NB-GS for qemu-devel@nongnu.org; Wed, 21 Oct 2009 09:52:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0bbk-0005Fs-Sh for qemu-devel@nongnu.org; Wed, 21 Oct 2009 09:52:13 -0400 Received: from [199.232.76.173] (port=37609 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0bbk-0005Fa-OL for qemu-devel@nongnu.org; Wed, 21 Oct 2009 09:52:08 -0400 Received: from cantor.suse.de ([195.135.220.2]:54508 helo=mx1.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N0bbj-0005NT-Sj for qemu-devel@nongnu.org; Wed, 21 Oct 2009 09:52:08 -0400 Received: from relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 6C31B945D6; Wed, 21 Oct 2009 15:52:05 +0200 (CEST) From: Ulrich Hecht To: aurelien@aurel32.net Date: Wed, 21 Oct 2009 15:52:32 +0200 Message-Id: <1256133153-3121-12-git-send-email-uli@suse.de> X-Mailer: git-send-email 1.6.2.1 In-Reply-To: <1256133153-3121-11-git-send-email-uli@suse.de> References: <1256133153-3121-1-git-send-email-uli@suse.de> <1256133153-3121-2-git-send-email-uli@suse.de> <1256133153-3121-3-git-send-email-uli@suse.de> <1256133153-3121-4-git-send-email-uli@suse.de> <1256133153-3121-5-git-send-email-uli@suse.de> <1256133153-3121-6-git-send-email-uli@suse.de> <1256133153-3121-7-git-send-email-uli@suse.de> <1256133153-3121-8-git-send-email-uli@suse.de> <1256133153-3121-9-git-send-email-uli@suse.de> <1256133153-3121-10-git-send-email-uli@suse.de> <1256133153-3121-11-git-send-email-uli@suse.de> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 Cc: riku.voipio@iki.fi, qemu-devel@nongnu.org, agraf@suse.de Subject: [Qemu-devel] [PATCH 11/12] linux-user: getpriority errno fix X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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));