qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] linux-user, alpha: l_type of fcntl() flock diff


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] linux-user, alpha: l_type of fcntl() flock differs
Date: Mon, 07 Jan 2013 15:06:13 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]