* [Qemu-devel] [PATCH] qemu: virtio-9p: Recognize 9P2000.L protocol
@ 2010-05-27 8:27 M. Mohan Kumar
0 siblings, 0 replies; only message in thread
From: M. Mohan Kumar @ 2010-05-27 8:27 UTC (permalink / raw)
To: Qemu-development List
Make 9P server recognize 9P2000.L protocol version
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
---
hw/virtio-9p.c | 6 +++++-
hw/virtio-9p.h | 6 ++++++
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c
index e5d0112..25bd723 100644
--- a/hw/virtio-9p.c
+++ b/hw/virtio-9p.c
@@ -949,7 +949,11 @@ static void v9fs_version(V9fsState *s, V9fsPDU *pdu)
pdu_unmarshal(pdu, offset, "ds", &msize, &version);
- if (strcmp(version.data, "9P2000.u")) {
+ if (!strcmp(version.data, "9P2000.u")) {
+ s->proto_version = V9FS_PROTO_2000U;
+ } else if (!strcmp(version.data, "9P2000.L")) {
+ s->proto_version = V9FS_PROTO_2000L;
+ } else {
v9fs_string_sprintf(&version, "unknown");
}
diff --git a/hw/virtio-9p.h b/hw/virtio-9p.h
index b95dbe4..3a1e853 100644
--- a/hw/virtio-9p.h
+++ b/hw/virtio-9p.h
@@ -57,6 +57,11 @@ enum {
P9_QTFILE = 0x00,
};
+enum p9_proto_version {
+ V9FS_PROTO_2000U = 0x01,
+ V9FS_PROTO_2000L = 0x02,
+};
+
#define P9_NOTAG (u16)(~0)
#define P9_NOFID (u32)(~0)
#define P9_MAXWELEM 16
@@ -144,6 +149,7 @@ typedef struct V9fsState
uint16_t tag_len;
uint8_t *tag;
size_t config_size;
+ enum p9_proto_version proto_version;
} V9fsState;
struct virtio_9p_config
--
1.6.6.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-27 8:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27 8:27 [Qemu-devel] [PATCH] qemu: virtio-9p: Recognize 9P2000.L protocol M. Mohan Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).