From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHYq1-0007gl-2T for qemu-devel@nongnu.org; Fri, 19 Jun 2009 03:48:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHYpz-0007gZ-Tn for qemu-devel@nongnu.org; Fri, 19 Jun 2009 03:48:40 -0400 Received: from [199.232.76.173] (port=37165 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHYpz-0007gW-PG for qemu-devel@nongnu.org; Fri, 19 Jun 2009 03:48:39 -0400 Received: from naru.obs2.net ([84.20.150.76]:45679) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MHYpz-0002qT-9n for qemu-devel@nongnu.org; Fri, 19 Jun 2009 03:48:39 -0400 Date: Fri, 19 Jun 2009 10:48:35 +0300 From: Riku Voipio Subject: Re: [Qemu-devel] [PATCH] linux-user/syscall.c: add missing linux-specific fnctl commands Message-ID: <20090619074835.GA20694@kos.to> References: <87skhxsrfo.fsf@lechat.rtp-net.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87skhxsrfo.fsf@lechat.rtp-net.org> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Arnaud Patard Cc: qemu-devel@nongnu.org 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 > 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 */