From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTdut-0000Bg-OZ for qemu-devel@nongnu.org; Mon, 06 Jun 2011 13:48:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTdur-0003eK-Lj for qemu-devel@nongnu.org; Mon, 06 Jun 2011 13:48:43 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:36316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTdur-0003e2-0J for qemu-devel@nongnu.org; Mon, 06 Jun 2011 13:48:41 -0400 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp06.au.ibm.com (8.14.4/8.13.1) with ESMTP id p56HltgD013951 for ; Tue, 7 Jun 2011 03:47:55 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p56HmQMf1314874 for ; Tue, 7 Jun 2011 03:48:26 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p56HmQHK002473 for ; Tue, 7 Jun 2011 03:48:26 +1000 From: "Aneesh Kumar K.V" Date: Mon, 6 Jun 2011 23:18:16 +0530 Message-Id: <1307382497-3737-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com> In-Reply-To: <1307382497-3737-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1307382497-3737-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 3/4] hw/9pfs: Update the fidp path before opendir List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, "Aneesh Kumar K.V" We need to update the fidp path before opendir. Since we don't use the fid returned by mkdir, earlier code should not have much issue. We do a double v9fs_string_copy here. The later patch cleanup the entire function. Signed-off-by: Aneesh Kumar K.V --- hw/9pfs/virtio-9p.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index 6b992f8..792b16a 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -2114,6 +2114,7 @@ static void v9fs_create(void *opaque) if (err < 0) { goto out; } + v9fs_string_copy(&fidp->path, &fullname); err = v9fs_co_opendir(pdu->s, fidp); if (err < 0) { goto out; -- 1.7.4.1