qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user/syscall.c: add missing linux-specific fnctl commands
@ 2009-06-18 11:38 Arnaud Patard
  2009-06-19  7:48 ` Riku Voipio
  0 siblings, 1 reply; 2+ messages in thread
From: Arnaud Patard @ 2009-06-18 11:38 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]


This patch is adding missing linux-specific fcntl command. I've tested
with ltp test SETLEASE and GETLEASE but there was no tests for F_NOTIFY
and F_DUPFD_CLOEXEC.


Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fcntl_linuxspecific.patch --]
[-- Type: text/x-diff, Size: 1138 bytes --]

Index: qemu/linux-user/syscall.c
===================================================================
--- qemu.orig/linux-user/syscall.c
+++ qemu/linux-user/syscall.c
@@ -3654,6 +3654,11 @@ static int target_to_host_fcntl_cmd(int 
 	case TARGET_F_SETLKW64:
 	    return F_SETLKW64;
 #endif
+	case TARGET_F_SETLEASE:
+	case TARGET_F_GETLEASE:
+	case TARGET_F_NOTIFY:
+	case TARGET_F_DUPFD_CLOEXEC:
+	    return cmd;
 	default:
             return -TARGET_EINVAL;
     }
Index: qemu/linux-user/syscall_defs.h
===================================================================
--- qemu.orig/linux-user/syscall_defs.h
+++ qemu/linux-user/syscall_defs.h
@@ -1732,6 +1732,11 @@ struct target_statfs64 {
 };
 #endif
 
+#define TARGET_F_LINUX_SPECIFIC_BASE 1024
+#define TARGET_F_SETLEASE      (TARGET_F_LINUX_SPECIFIC_BASE + 0)
+#define TARGET_F_GETLEASE      (TARGET_F_LINUX_SPECIFIC_BASE + 1)
+#define TARGET_F_NOTIFY        (TARGET_F_LINUX_SPECIFIC_BASE + 2)
+#define TARGET_F_DUPFD_CLOEXEC (TARGET_F_LINUX_SPECIFIC_BASE + 6)
 
 #define TARGET_F_DUPFD         0       /* dup */
 #define TARGET_F_GETFD         1       /* get close_on_exec */

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

* Re: [Qemu-devel] [PATCH] linux-user/syscall.c: add missing linux-specific fnctl commands
  2009-06-18 11:38 [Qemu-devel] [PATCH] linux-user/syscall.c: add missing linux-specific fnctl commands Arnaud Patard
@ 2009-06-19  7:48 ` Riku Voipio
  0 siblings, 0 replies; 2+ messages in thread
From: Riku Voipio @ 2009-06-19  7:48 UTC (permalink / raw)
  To: Arnaud Patard; +Cc: qemu-devel

On Thu, Jun 18, 2009 at 01:38:03PM +0200, Arnaud Patard wrote:
> This patch is adding missing linux-specific fcntl command. I've tested
> with ltp test SETLEASE and GETLEASE but there was no tests for F_NOTIFY
> and F_DUPFD_CLOEXEC.

Looks fine, picked up for next batch of patches to send.

> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>

> Index: qemu/linux-user/syscall.c
> ===================================================================
> --- qemu.orig/linux-user/syscall.c
> +++ qemu/linux-user/syscall.c
> @@ -3654,6 +3654,11 @@ static int target_to_host_fcntl_cmd(int 
>  	case TARGET_F_SETLKW64:
>  	    return F_SETLKW64;
>  #endif
> +	case TARGET_F_SETLEASE:
> +	case TARGET_F_GETLEASE:
> +	case TARGET_F_NOTIFY:
> +	case TARGET_F_DUPFD_CLOEXEC:
> +	    return cmd;
>  	default:
>              return -TARGET_EINVAL;
>      }
> Index: qemu/linux-user/syscall_defs.h
> ===================================================================
> --- qemu.orig/linux-user/syscall_defs.h
> +++ qemu/linux-user/syscall_defs.h
> @@ -1732,6 +1732,11 @@ struct target_statfs64 {
>  };
>  #endif
>  
> +#define TARGET_F_LINUX_SPECIFIC_BASE 1024
> +#define TARGET_F_SETLEASE      (TARGET_F_LINUX_SPECIFIC_BASE + 0)
> +#define TARGET_F_GETLEASE      (TARGET_F_LINUX_SPECIFIC_BASE + 1)
> +#define TARGET_F_NOTIFY        (TARGET_F_LINUX_SPECIFIC_BASE + 2)
> +#define TARGET_F_DUPFD_CLOEXEC (TARGET_F_LINUX_SPECIFIC_BASE + 6)
>  
>  #define TARGET_F_DUPFD         0       /* dup */
>  #define TARGET_F_GETFD         1       /* get close_on_exec */

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

end of thread, other threads:[~2009-06-19  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-18 11:38 [Qemu-devel] [PATCH] linux-user/syscall.c: add missing linux-specific fnctl commands Arnaud Patard
2009-06-19  7:48 ` Riku Voipio

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