qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 08/17] virtio-9p: Implement P9_TCLUNK


From: Anthony Liguori
Subject: [Qemu-devel] [PATCH 08/17] virtio-9p: Implement P9_TCLUNK
Date: Wed, 3 Mar 2010 13:01:05 -0600

This patch gets ls -al to work

Signed-off-by: Anthony Liguori <address@hidden>
Signed-off-by: Aneesh Kumar K.V <address@hidden>
---
 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 b30933a..7822a00 100644
--- a/hw/virtio-9p.c
+++ b/hw/virtio-9p.c
@@ -1305,8 +1305,20 @@ 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);
 }
 
 static void v9fs_write(V9fsState *s, V9fsPDU *pdu)
-- 
1.6.5.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]