Received: from eggs.gnu.org ([2001:4830:134:3::10]:41383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8AHs-0007BS-80 for qemu-devel@nongnu.org; Tue, 28 Jan 2014 10:09:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8AHn-0002Kf-85 for qemu-devel@nongnu.org; Tue, 28 Jan 2014 10:09:16 -0500 Received: from mga02.intel.com ([134.134.136.20]:21797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8AHn-0002KZ-10 for qemu-devel@nongnu.org; Tue, 28 Jan 2014 10:09:11 -0500 From: "Kirill A. Shutemov" Date: Tue, 28 Jan 2014 17:08:25 +0200 Message-Id: <1390921707-15109-2-git-send-email-kirill.shutemov@linux.intel.com> In-Reply-To: <1390921707-15109-1-git-send-email-kirill.shutemov@linux.intel.com> References: <1390921707-15109-1-git-send-email-kirill.shutemov@linux.intel.com> Subject: [Qemu-devel] [PATCH 2/4] hw/9pfs: handle undefined FS_IOC_GETVERSION case in handle_ioc_getversion() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, aliguori@amazon.com, mst@redhat.com Cc: aneesh.kumar@linux.vnet.ibm.com, "Kirill A. Shutemov" , armbru@redhat.com All get_st_gen() implementations except handle_ioc_getversion() have guard for undefined FS_IOC_GETVERSION. Let's add it there too. Signed-off-by: Kirill A. Shutemov --- hw/9pfs/virtio-9p-handle.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/9pfs/virtio-9p-handle.c b/hw/9pfs/virtio-9p-handle.c index fe8e0ed19dcc..ed8c126e1d6c 100644 --- a/hw/9pfs/virtio-9p-handle.c +++ b/hw/9pfs/virtio-9p-handle.c @@ -582,6 +582,7 @@ static int handle_unlinkat(FsContext *ctx, V9fsPath *dir, static int handle_ioc_getversion(FsContext *ctx, V9fsPath *path, mode_t st_mode, uint64_t *st_gen) { +#ifdef FS_IOC_GETVERSION int err; V9fsFidOpenState fid_open; @@ -599,6 +600,10 @@ static int handle_ioc_getversion(FsContext *ctx, V9fsPath *path, err = ioctl(fid_open.fd, FS_IOC_GETVERSION, st_gen); handle_close(ctx, &fid_open); return err; +#else + errno = ENOTTY; + return -1; +#endif } static int handle_init(FsContext *ctx) -- 1.8.5.2