From: "Andreas Färber" <afaerber@suse.de>
To: Meador Inge <meadori@codesourcery.com>
Cc: Riku Voipio <riku.voipio@iki.fi>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v1 1/1] syscall: #ifdef newer RLIMIT_* codes
Date: Mon, 20 Feb 2012 20:38:12 +0100 [thread overview]
Message-ID: <4F42A124.8080406@suse.de> (raw)
In-Reply-To: <1329762416-6012-1-git-send-email-meadori@codesourcery.com>
Am 20.02.2012 19:26, schrieb Meador Inge:
> Commit e22b7015353be824620b1f0f5e32a8575b898a8c added the translation
> from target to host RLIMIT_* codes, but some of the added codes are
> only available on newer version of Linux (as documented in 'getrlimit(2)').
>
> Signed-off-by: Meador Inge <meadori@codesourcery.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
CC'ing the linux-user maintainer.
Andreas
> ---
> 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;
> +/* >= Linux 2.6.8 */
> +#ifdef RLIMIT_MSGQUEUE
> case TARGET_RLIMIT_MSGQUEUE:
> return RLIMIT_MSGQUEUE;
> +#endif
> +/* >= 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;
> +/* >= Linux 2.6.12 */
> +#ifdef RLIMIT_RTPRIO
> case TARGET_RLIMIT_RTPRIO:
> return RLIMIT_RTPRIO;
> +#endif
> +/* >= Linux 2.6.8 */
> +#ifdef RLIMIT_SIGPENDING
> case TARGET_RLIMIT_SIGPENDING:
> return RLIMIT_SIGPENDING;
> +#endif
> case TARGET_RLIMIT_STACK:
> return RLIMIT_STACK;
> default:
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-02-20 19:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-20 18:26 [Qemu-devel] [PATCH v1 1/1] syscall: #ifdef newer RLIMIT_* codes Meador Inge
2012-02-20 19:38 ` Andreas Färber [this message]
2012-03-27 15:08 ` Meador Inge
2012-03-27 17:15 ` Riku Voipio
2012-03-27 20:20 ` Meador Inge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F42A124.8080406@suse.de \
--to=afaerber@suse.de \
--cc=meadori@codesourcery.com \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).