From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7Sex-0005pc-6M for qemu-devel@nongnu.org; Thu, 29 Apr 2010 08:16:03 -0400 Received: from [140.186.70.92] (port=45945 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7Sev-0005oV-Sz for qemu-devel@nongnu.org; Thu, 29 Apr 2010 08:16:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7Set-0006vv-Lv for qemu-devel@nongnu.org; Thu, 29 Apr 2010 08:16:01 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:57167) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7Set-0006vT-2p for qemu-devel@nongnu.org; Thu, 29 Apr 2010 08:15:59 -0400 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp07.au.ibm.com (8.14.3/8.13.1) with ESMTP id o3TCG3BU024900 for ; Thu, 29 Apr 2010 22:16:03 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o3TC97in1573092 for ; Thu, 29 Apr 2010 22:09:07 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o3TCFv2q020913 for ; Thu, 29 Apr 2010 22:15:57 +1000 From: "Aneesh Kumar K.V" Date: Thu, 29 Apr 2010 17:44:57 +0530 Message-Id: <1272543303-9830-16-git-send-email-aneesh.kumar@linux.vnet.ibm.com> In-Reply-To: <1272543303-9830-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1272543303-9830-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH -V6 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, jvrao@linux.vnet.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 96e75d6..b9b892c 100644 --- a/hw/virtio-9p.c +++ b/hw/virtio-9p.c @@ -1311,9 +1311,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