Received: from eggs.gnu.org ([208.118.235.92]:44338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCa02-0001KL-4k for qemu-devel@nongnu.org; Tue, 27 Mar 2012 13:16:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCZzx-0005Cc-2j for qemu-devel@nongnu.org; Tue, 27 Mar 2012 13:16:01 -0400 Received: from afflict.kos.to ([92.243.29.197]:59000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCZzw-0005Bc-Op for qemu-devel@nongnu.org; Tue, 27 Mar 2012 13:15:57 -0400 Date: Tue, 27 Mar 2012 20:15:54 +0300 From: Riku Voipio Message-ID: <20120327171554.GA16571@afflict.kos.to> References: <1329762416-6012-1-git-send-email-meadori@codesourcery.com> <4F42A124.8080406@suse.de> <4F71D7D3.1040901@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4F71D7D3.1040901@codesourcery.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v1 1/1] syscall: #ifdef newer RLIMIT_* codes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Meador Inge Cc: qemu-devel@nongnu.org, Andreas =?utf-8?Q?F=C3=A4rber?= Hi, Do we really need this? 2.6.12 came out in 2005, even oldest supported RHEL (5) is minimum 2.6.18 these days. Riku On Tue, Mar 27, 2012 at 10:08:03AM -0500, Meador Inge wrote: > Ping. >=20 > On 02/20/2012 01:38 PM, Andreas F=C3=A4rber wrote: > > Am 20.02.2012 19:26, schrieb Meador Inge: > >> Commit e22b7015353be824620b1f0f5e32a8575b898a8c added the translatio= n > >> from target to host RLIMIT_* codes, but some of the added codes are > >> only available on newer version of Linux (as documented in 'getrlimi= t(2)'). > >> > >> Signed-off-by: Meador Inge > >=20 > > Reviewed-by: Andreas F=C3=A4rber > >=20 > > CC'ing the linux-user maintainer. > >=20 > > Andreas > >=20 > >> --- > >> linux-user/syscall.c | 12 ++++++++++++ > >> 1 files changed, 12 insertions(+), 0 deletions(-) > >> > >> diff --git a/linux-user/syscall.c b/linux-user/syscall.c > >> index 8a11213..1986238 100644 > >> --- a/linux-user/syscall.c > >> +++ b/linux-user/syscall.c > >> @@ -996,20 +996,32 @@ static inline int target_to_host_resource(int = code) > >> return RLIMIT_LOCKS; > >> case TARGET_RLIMIT_MEMLOCK: > >> return RLIMIT_MEMLOCK; > >> +/* >=3D Linux 2.6.8 */ > >> +#ifdef RLIMIT_MSGQUEUE > >> case TARGET_RLIMIT_MSGQUEUE: > >> return RLIMIT_MSGQUEUE; > >> +#endif > >> +/* >=3D Linux 2.6.12 */ > >> +#ifdef RLIMIT_NICE > >> case TARGET_RLIMIT_NICE: > >> return RLIMIT_NICE; > >> +#endif > >> case TARGET_RLIMIT_NOFILE: > >> return RLIMIT_NOFILE; > >> case TARGET_RLIMIT_NPROC: > >> return RLIMIT_NPROC; > >> case TARGET_RLIMIT_RSS: > >> return RLIMIT_RSS; > >> +/* >=3D Linux 2.6.12 */ > >> +#ifdef RLIMIT_RTPRIO > >> case TARGET_RLIMIT_RTPRIO: > >> return RLIMIT_RTPRIO; > >> +#endif > >> +/* >=3D Linux 2.6.8 */ > >> +#ifdef RLIMIT_SIGPENDING > >> case TARGET_RLIMIT_SIGPENDING: > >> return RLIMIT_SIGPENDING; > >> +#endif > >> case TARGET_RLIMIT_STACK: > >> return RLIMIT_STACK; > >> default: > >=20 >=20 >=20 > --=20 > Meador Inge > CodeSourcery / Mentor Embedded > http://www.mentor.com/embedded-software