qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 01/20] qemu: virtio-9p: Recognize 9P2000.L protocol
@ 2010-06-28 21:54 Venkateswararao Jujjuri (JV)
  2010-06-28 21:54 ` [Qemu-devel] [PATCH 02/20] qemu: virtio-9p: Implement statfs support in server Venkateswararao Jujjuri (JV)
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: Venkateswararao Jujjuri (JV) @ 2010-06-28 21:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, M. Mohan Kumar, Venkateswararao Jujjuri

From: M. Mohan Kumar <mohan@in.ibm.com>

Make 9P server recognize 9P2000.L protocol version

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.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 f8c85c3..e41c51e 100644
--- a/hw/virtio-9p.c
+++ b/hw/virtio-9p.c
@@ -1025,7 +1025,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 67f8087..9286f59 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;
 
 typedef struct V9fsCreateState {
-- 
1.6.5.2

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2010-06-28 21:52 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-28 21:54 [Qemu-devel] [PATCH 01/20] qemu: virtio-9p: Recognize 9P2000.L protocol Venkateswararao Jujjuri (JV)
2010-06-28 21:54 ` [Qemu-devel] [PATCH 02/20] qemu: virtio-9p: Implement statfs support in server Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 03/20] virtio-9p: Return correct error from v9fs_remove Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 04/20] [V4] virtio-9p: readdir implementation for 9p2000.L Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 05/20] virtio-9p: Compute iounit based on host filesystem block size Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 06/20] virtio-9p: getattr server implementation for 9P2000.L protocol Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 07/20] virtio-9p: Do not reset atime Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 08/20] [virtio-9p] Make v9fs_do_utimensat accept timespec structures instead of v9stat Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 09/20] virtio-9p: Implement server side of setattr for 9P2000.L protocol Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 10/20] [virtio-9p] Implement TLINK for 9P2000.L Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 11/20] [virtio-9p] Define and implement TSYMLINK " Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 12/20] [virtio-9p] This patch implements TLCREATE for 9p2000.L protocol Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 13/20] qemu: virtio-9p: Implement TMKNOD Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 14/20] qemu: virtio-9p: Implement TMKDIR Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 15/20] rename - change name of file or directory Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 16/20] qemu: virtio-9p: Implement LOPEN Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 17/20] virtio-9p: Add fidtype so that we can do type specific operation Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 18/20] virtio-9p: Implement TXATTRWALK Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 19/20] virtio-9p: Implement TXATTRCREATE Venkateswararao Jujjuri (JV)
2010-06-28 21:55 ` [Qemu-devel] [PATCH 20/20] virtio-9p: Hide user.virtfs xattr in case of mapped security Venkateswararao Jujjuri (JV)

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).