]> Git Repo - qemu.git/commitdiff
[virtio-9p] This patch implements TLERROR/RLERROR on the qemu 9P server.
authorArun R Bharadwaj <[email protected]>
Wed, 28 Jul 2010 08:40:22 +0000 (14:10 +0530)
committerAneesh Kumar K.V <[email protected]>
Wed, 8 Sep 2010 17:28:40 +0000 (22:58 +0530)
Signed-off-by: Arun R Bharadwaj <[email protected]>
Signed-off-by: Venkateswararao Jujjuri <[email protected]>
hw/virtio-9p.c
hw/virtio-9p.h

index 60a40b9330735dbc6ffcbedbeae65c64adc7698a..4b15ce7197e9e5c30b7ba73f0b5f17be593bae59 100644 (file)
@@ -844,17 +844,24 @@ static void complete_pdu(V9fsState *s, V9fsPDU *pdu, ssize_t len)
     int8_t id = pdu->id + 1; /* Response */
 
     if (len < 0) {
-        V9fsString str;
         int err = -len;
+        len = 7;
 
-        str.data = strerror(err);
-        str.size = strlen(str.data);
+        if (s->proto_version != V9FS_PROTO_2000L) {
+            V9fsString str;
+
+            str.data = strerror(err);
+            str.size = strlen(str.data);
+
+            len += pdu_marshal(pdu, len, "s", &str);
+            id = P9_RERROR;
+        }
 
-        len = 7;
-        len += pdu_marshal(pdu, len, "s", &str);
         len += pdu_marshal(pdu, len, "d", err);
 
-        id = P9_RERROR;
+        if (s->proto_version == V9FS_PROTO_2000L) {
+            id = P9_RLERROR;
+        }
     }
 
     /* fill out the header */
index 016ba1dcf7b9aef8489a9e8558a724ce6d35200b..0816ad66ecffbce0743d6a7a8964ce947b76a19f 100644 (file)
@@ -13,6 +13,8 @@
 #define VIRTIO_9P_MOUNT_TAG 0
 
 enum {
+    P9_TLERROR = 6,
+    P9_RLERROR,
     P9_TSTATFS = 8,
     P9_RSTATFS,
     P9_TLOPEN = 12,
This page took 0.032372 seconds and 4 git commands to generate.