summaryrefslogtreecommitdiff
path: root/hw/virtio-9p.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2010-04-29 17:44:57 +0530
committerAnthony Liguori <aliguori@us.ibm.com>2010-05-03 12:17:39 -0500
commitbbd5697b8ea7e8795e83d3550cd1a11077c57fd4 (patch)
treee32786c486e2d09625d000909bc9653252437d43 /hw/virtio-9p.c
parenta92315553df516a5e3431142aadab93482c6b29f (diff)
virtio-9p: Add P9_TCLUNK support
Implement P9_TCLUNK support. This patch gets `ls -al` to work. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-9p.c')
-rw-r--r--hw/virtio-9p.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c
index 96e75d6ed..b9b892c31 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 {