From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O2PtP-0003T1-6K for qemu-devel@nongnu.org; Thu, 15 Apr 2010 10:18:07 -0400 Received: from [140.186.70.92] (port=50430 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2PtM-0003MB-1Q for qemu-devel@nongnu.org; Thu, 15 Apr 2010 10:18:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O2Pn2-0000Jb-0Q for qemu-devel@nongnu.org; Thu, 15 Apr 2010 10:11:48 -0400 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:59827) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2Pn0-0000Ia-TR for qemu-devel@nongnu.org; Thu, 15 Apr 2010 10:11:31 -0400 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp05.in.ibm.com (8.14.3/8.13.1) with ESMTP id o3FEBSdE023965 for ; Thu, 15 Apr 2010 19:41:28 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o3FEBSrA2625666 for ; Thu, 15 Apr 2010 19:41:28 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o3FEBSkl030838 for ; Thu, 15 Apr 2010 19:41:28 +0530 From: "Aneesh Kumar K.V" Date: Thu, 15 Apr 2010 19:41:05 +0530 Message-Id: <1271340671-19558-16-git-send-email-aneesh.kumar@linux.vnet.ibm.com> In-Reply-To: <1271340671-19558-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1271340671-19558-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH -V5 15/21] virtio-9p: Add P9_TCLUNK support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: ericvh@gmail.com, aliguori@us.ibm.com, aneesh.kumar@linux.vnet.ibm.com From: Anthony Liguori Implement P9_TCLUNK support. This patch gets `ls -al` to work. Signed-off-by: Anthony Liguori Signed-off-by: Aneesh Kumar K.V --- hw/virtio-9p.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c index e702c5c..480f68b 100644 --- a/hw/virtio-9p.c +++ b/hw/virtio-9p.c @@ -1313,9 +1313,21 @@ out: static void v9fs_clunk(V9fsState *s, V9fsPDU *pdu) { - if (debug_9p_pdu) { - pprint_pdu(pdu); + int32_t fid; + size_t offset = 7; + int err; + + pdu_unmarshal(pdu, offset, "d", &fid); + + err = free_fid(s, fid); + if (err < 0) { + goto out; } + + offset = 7; + err = offset; +out: + complete_pdu(s, pdu, err); } typedef struct V9fsReadState { -- 1.7.0.4.360.g11766c