[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH -V4 25/26] [virtio-9p] This patch implements TLERROR
From: |
Venkateswararao Jujjuri (JV) |
Subject: |
[Qemu-devel] [PATCH -V4 25/26] [virtio-9p] This patch implements TLERROR/RLERROR on the qemu 9P server. |
Date: |
Sun, 29 Aug 2010 12:02:51 -0700 |
From: Arun R Bharadwaj <address@hidden>
Signed-off-by: Arun R Bharadwaj <address@hidden>
Signed-off-by: Venkateswararao Jujjuri <address@hidden>
---
hw/virtio-9p.c | 19 +++++++++++++------
hw/virtio-9p.h | 2 ++
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c
index 94dff78..b6cbbbb 100644
--- a/hw/virtio-9p.c
+++ b/hw/virtio-9p.c
@@ -832,17 +832,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 */
diff --git a/hw/virtio-9p.h b/hw/virtio-9p.h
index 016ba1d..0816ad6 100644
--- a/hw/virtio-9p.h
+++ b/hw/virtio-9p.h
@@ -13,6 +13,8 @@
#define VIRTIO_9P_MOUNT_TAG 0
enum {
+ P9_TLERROR = 6,
+ P9_RLERROR,
P9_TSTATFS = 8,
P9_RSTATFS,
P9_TLOPEN = 12,
--
1.6.5.2
- [Qemu-devel] [PATCH -V4 12/26] [virtio-9p] This patch implements TLCREATE for 9p2000.L protocol., (continued)
- [Qemu-devel] [PATCH -V4 12/26] [virtio-9p] This patch implements TLCREATE for 9p2000.L protocol., Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 13/26] qemu: virtio-9p: Implement TMKNOD, Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 15/26] rename - change name of file or directory, Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 16/26] [virtio-9p] qemu: virtio-9p: Implement LOPEN, Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 14/26] qemu: virtio-9p: Implement TMKDIR, Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 18/26] virtio-9p: Implement TXATTRWALK, Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 17/26] virtio-9p: Add fidtype so that we can do type specific operation, Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 19/26] virtio-9p: Implement TXATTRCREATE, Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 20/26] virtio-9p: Hide user.virtfs xattr in case of mapped security., Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 22/26] virtio-9p: Use lchown which won't follow symlink, Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 25/26] [virtio-9p] This patch implements TLERROR/RLERROR on the qemu 9P server.,
Venkateswararao Jujjuri (JV) <=
- [Qemu-devel] [PATCH -V4 24/26] [virtio-9p] Remove all instances of unnecessary dotu variable., Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 23/26] virtio-9p: Fix the memset usage, Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 26/26] virtio-9p: Change handling of flags in open() path for 9P2000.L, Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 21/26] virtio-9p: Add SM_NONE security model, Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 04/26] [V4] virtio-9p: readdir implementation for 9p2000.L, Venkateswararao Jujjuri (JV), 2010/08/29
- [Qemu-devel] [PATCH -V4 03/26] virtio-9p: Return correct error from v9fs_remove, Venkateswararao Jujjuri (JV), 2010/08/29