From: Richard Henderson <rth@twiddle.net>
To: Laurent Vivier <laurent@vivier.eu>
Cc: Riku Voipio <riku.voipio@iki.fi>,
qemu-devel@nongnu.org, dillona@dillona.com
Subject: Re: [Qemu-devel] [PATCH] linux-user, alpha: l_type of fcntl() flock differs
Date: Mon, 07 Jan 2013 15:06:13 -0800 [thread overview]
Message-ID: <50EB54E5.9040307@twiddle.net> (raw)
In-Reply-To: <1357597486-19395-1-git-send-email-laurent@vivier.eu>
On 01/07/2013 02:24 PM, Laurent Vivier wrote:
> +static short target_to_host_flock_type(short type)
> +{
> + switch (type) {
> + case TARGET_F_RDLCK:
> + return F_RDLCK;
> + case TARGET_F_WRLCK:
> + return F_WRLCK;
> + case TARGET_F_UNLCK:
> + return F_UNLCK;
> + case TARGET_F_EXLCK:
> + return F_EXLCK;
> + case TARGET_F_SHLCK:
> + return F_SHLCK;
> + default:
> + return type;
> + }
> +}
> +
> +static short host_to_target_flock_type(short type)
> +{
> + switch (type) {
> + case F_RDLCK:
> + return TARGET_F_RDLCK;
> + case F_WRLCK:
> + return TARGET_F_WRLCK;
> + case F_UNLCK:
> + return TARGET_F_UNLCK;
> + case F_EXLCK:
> + return TARGET_F_EXLCK;
> + case F_SHLCK:
> + return TARGET_F_SHLCK;
> + default:
> + return type;
> + }
> +}
Any reason not to use the bitmask_transtbl method of translation?
r~
next prev parent reply other threads:[~2013-01-07 23:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 22:24 [Qemu-devel] [PATCH] linux-user, alpha: l_type of fcntl() flock differs Laurent Vivier
2013-01-07 23:06 ` Richard Henderson [this message]
2013-01-08 9:18 ` Laurent Vivier
2013-01-10 20:42 ` [Qemu-devel] [PATCH][v2] " Laurent Vivier
2013-01-10 21:05 ` Richard Henderson
2013-01-10 21:10 ` Laurent Vivier
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=50EB54E5.9040307@twiddle.net \
--to=rth@twiddle.net \
--cc=dillona@dillona.com \
--cc=laurent@vivier.eu \
--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).