[virtio-9p] This patch implements TLERROR/RLERROR on the qemu 9P server.

Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
This commit is contained in:
Arun R Bharadwaj 2010-07-28 14:10:22 +05:30 committed by Aneesh Kumar K.V
parent cf03eb2c18
commit 8f4d1ca58f
2 changed files with 16 additions and 7 deletions

View 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;
str.data = strerror(err);
str.size = strlen(str.data);
len = 7;
len += pdu_marshal(pdu, len, "s", &str);
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 += pdu_marshal(pdu, len, "d", err);
id = P9_RERROR;
if (s->proto_version == V9FS_PROTO_2000L) {
id = P9_RLERROR;
}
}
/* fill out the header */

View 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,