From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsVL1-0003bk-06 for qemu-devel@nongnu.org; Tue, 08 Jan 2013 04:19:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsVKz-0008RF-Kw for qemu-devel@nongnu.org; Tue, 08 Jan 2013 04:19:14 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:57810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsVKz-0008RA-C1 for qemu-devel@nongnu.org; Tue, 08 Jan 2013 04:19:13 -0500 Date: Tue, 8 Jan 2013 10:18:51 +0100 (CET) From: Laurent Vivier Message-ID: <1065997767.591104.1357636731187.JavaMail.open-xchange@ox-webdesk.1and1.fr> In-Reply-To: <50EB54E5.9040307@twiddle.net> References: <1357597486-19395-1-git-send-email-laurent@vivier.eu> <50EB54E5.9040307@twiddle.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_591103_1095704245.1357636731080" Subject: Re: [Qemu-devel] [PATCH] linux-user, alpha: l_type of fcntl() flock differs Reply-To: Laurent Vivier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Riku Voipio , qemu-devel@nongnu.org, dillona@dillona.com ------=_Part_591103_1095704245.1357636731080 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le 8 janvier 2013 =C3=A0 00:06, Richard Henderson a =C3= =A9crit : > 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? > No reason. I correct this. Regards, Laurent ------=_Part_591103_1095704245.1357636731080 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

Le 8 janvier 2013 à 00:06, Richard Henderson <rth@twiddle.net> a écrit :
> 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?
>
No reason. I correct this.
 
Regards,
Laurent
------=_Part_591103_1095704245.1357636731080--