From patchwork Thu Oct 27 12:02:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 122123 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E87B11007D8 for ; Thu, 27 Oct 2011 23:03:32 +1100 (EST) Received: from localhost ([::1]:55439 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJOg3-0002f9-Il for incoming@patchwork.ozlabs.org; Thu, 27 Oct 2011 08:03:19 -0400 Received: from eggs.gnu.org ([140.186.70.92]:37983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJOfm-0002XQ-Nk for qemu-devel@nongnu.org; Thu, 27 Oct 2011 08:03:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJOfi-0003K1-Gq for qemu-devel@nongnu.org; Thu, 27 Oct 2011 08:03:02 -0400 Received: from afflict.kos.to ([92.243.29.197]:35222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJOfi-0003JZ-8u for qemu-devel@nongnu.org; Thu, 27 Oct 2011 08:02:58 -0400 Received: by afflict.kos.to (Postfix, from userid 1000) id 3B11226668; Thu, 27 Oct 2011 12:02:56 +0000 (UTC) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Thu, 27 Oct 2011 15:02:48 +0300 Message-Id: <6cafd027be3a6cad710d99bde4a2b3b662869e5d.1319716562.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 92.243.29.197 Cc: Matthias Braun Subject: [Qemu-devel] [PATCH 02/10] linux-user: fix rlimit syscalls on sparc(64) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Matthias Braun Signed-off-by: Matthias Braun Signed-off-by: Riku Voipio --- linux-user/syscall_defs.h | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 1bc54c7..5fd4c9c 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -687,7 +687,7 @@ struct target_rlimit { #if defined(TARGET_ALPHA) #define TARGET_RLIM_INFINITY 0x7fffffffffffffffull -#elif defined(TARGET_MIPS) || defined(TARGET_SPARC) +#elif defined(TARGET_MIPS) || (defined(TARGET_SPARC) && TARGET_ABI_BITS == 32) #define TARGET_RLIM_INFINITY 0x7fffffffUL #else #define TARGET_RLIM_INFINITY ((abi_ulong)-1) @@ -716,8 +716,13 @@ struct target_rlimit { #define TARGET_RLIMIT_STACK 3 #define TARGET_RLIMIT_CORE 4 #define TARGET_RLIMIT_RSS 5 +#if defined(TARGET_SPARC) +#define TARGET_RLIMIT_NOFILE 6 +#define TARGET_RLIMIT_NPROC 7 +#else #define TARGET_RLIMIT_NPROC 6 #define TARGET_RLIMIT_NOFILE 7 +#endif #define TARGET_RLIMIT_MEMLOCK 8 #define TARGET_RLIMIT_AS 9 #define TARGET_RLIMIT_LOCKS 10