qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user: Rewrite deprecated fnctl options
@ 2013-01-04  4:29 dillona
  2013-01-04 18:46 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: dillona @ 2013-01-04  4:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: riku.voipio, Dillon Amburgey

From: Dillon Amburgey <dillona@dillona.com>

glibc on alpha still uses these

Signed-off-by: Dillon Amburgey <dillona@dillona.com>
---
 linux-user/syscall.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index e99adab..cb19ba1 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4558,6 +4558,10 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
         fl.l_start = tswapal(target_fl->l_start);
         fl.l_len = tswapal(target_fl->l_len);
         fl.l_pid = tswap32(target_fl->l_pid);
+        if (fl.l_type == F_SHLCK)
+            fl.l_type = F_RDLCK;
+        if (fl.l_type == F_EXLCK)
+            fl.l_type = F_WRLCK;
         unlock_user_struct(target_fl, arg, 0);
         ret = get_errno(fcntl(fd, host_cmd, &fl));
         break;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user: Rewrite deprecated fnctl options
  2013-01-04  4:29 [Qemu-devel] [PATCH] linux-user: Rewrite deprecated fnctl options dillona
@ 2013-01-04 18:46 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2013-01-04 18:46 UTC (permalink / raw)
  To: dillona; +Cc: riku.voipio, qemu-devel

On 01/03/2013 08:29 PM, dillona@dillona.com wrote:
> From: Dillon Amburgey <dillona@dillona.com>
> 
> glibc on alpha still uses these

No it doesn't.

> +        if (fl.l_type == F_SHLCK)
> +            fl.l_type = F_RDLCK;
> +        if (fl.l_type == F_EXLCK)
> +            fl.l_type = F_WRLCK;

Why would you want to do this?


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-04 18:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-04  4:29 [Qemu-devel] [PATCH] linux-user: Rewrite deprecated fnctl options dillona
2013-01-04 18:46 ` Richard Henderson

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).