From patchwork Tue Nov 29 09:41:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 128258 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EEABC1007D1 for ; Tue, 29 Nov 2011 20:42:58 +1100 (EST) Received: from localhost ([::1]:56341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVKDG-0006ZU-U0 for incoming@patchwork.ozlabs.org; Tue, 29 Nov 2011 04:42:54 -0500 Received: from eggs.gnu.org ([140.186.70.92]:33771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVKD7-0006W6-Ah for qemu-devel@nongnu.org; Tue, 29 Nov 2011 04:42:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVKD3-0000k5-KX for qemu-devel@nongnu.org; Tue, 29 Nov 2011 04:42:45 -0500 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:33431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVKD2-0000jF-Ve for qemu-devel@nongnu.org; Tue, 29 Nov 2011 04:42:41 -0500 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 29 Nov 2011 09:30:00 +1000 Received: from d23relay04.au.ibm.com ([202.81.31.246]) by e23smtp04.au.ibm.com ([202.81.31.210]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 29 Nov 2011 09:29:17 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAT9c8UH3248224 for ; Tue, 29 Nov 2011 20:38:15 +1100 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAT9fWCE006688 for ; Tue, 29 Nov 2011 20:41:32 +1100 Received: from skywalker.ibm.com ([9.124.94.69]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pAT9fUke006028; Tue, 29 Nov 2011 20:41:31 +1100 From: "Aneesh Kumar K.V" To: qemu-devel@nongnu.org Date: Tue, 29 Nov 2011 15:11:29 +0530 Message-Id: <1322559689-26605-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.5.4 x-cbid: 11112823-9264-0000-0000-0000004A5C90 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 202.81.31.146 Cc: aliguori@us.ibm.com, "Aneesh Kumar K.V" Subject: [Qemu-devel] [PATCH] hw/9pfs: Improve portability to older systems X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Aneesh Kumar K.V" commit ae0f940e6b4f5177892dd6a12762282fa9089972 2507718baf311ea78156c6777d38410a9f89ce89 missed updating virtio-9p-handle.c. Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p-handle.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/hw/9pfs/virtio-9p-handle.c b/hw/9pfs/virtio-9p-handle.c index 7644ae5..93552a1 100644 --- a/hw/9pfs/virtio-9p-handle.c +++ b/hw/9pfs/virtio-9p-handle.c @@ -599,7 +599,8 @@ 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) { - int err; + int err = -ENOTTY; +#ifdef FS_IOC_GETVERSION V9fsFidOpenState fid_open; /* @@ -615,6 +616,7 @@ static int handle_ioc_getversion(FsContext *ctx, V9fsPath *path, } err = ioctl(fid_open.fd, FS_IOC_GETVERSION, st_gen); handle_close(ctx, &fid_open); +#endif return err; } @@ -630,6 +632,7 @@ static int handle_init(FsContext *ctx) ret = data->mountfd; goto err_out; } +#ifdef FS_IOC_GETVERSION ret = statfs(ctx->fs_root, &stbuf); if (!ret) { switch (stbuf.f_type) { @@ -641,6 +644,7 @@ static int handle_init(FsContext *ctx) break; } } +#endif memset(&fh, 0, sizeof(struct file_handle)); ret = name_to_handle(data->mountfd, ".", &fh, &mnt_id, 0); if (ret && errno == EOVERFLOW) {