Patchwork Added legacy 9P2000 support back into QEMU

login
register
mail settings
Submitter William K. Bittner
Date June 15, 2011, 5:20 p.m.
Message ID <1308158449-15735-1-git-send-email-wkbittne@us.ibm.com>
Download mbox | patch
Permalink /patch/100559/
State New
Headers show

Comments

William K. Bittner - June 15, 2011, 5:20 p.m.
It was tested with v9fs in the guest by using: sudo mount -t 9p -o trans=virtio,version=9p2000 v_boot /pmnt

Signed-off-by: William K. Bittner <wkbittne@us.ibm.com>

Patch

diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index b5fc52b..febfba2 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -1186,6 +1186,8 @@  static void v9fs_version(V9fsState *s, V9fsPDU *pdu)
         s->proto_version = V9FS_PROTO_2000U;
     } else if (!strcmp(version.data, "9P2000.L")) {
         s->proto_version = V9FS_PROTO_2000L;
+    } else if (!strcmp(version.data, "9P2000")) {
+        s->proto_version = V9FS_PROTO_2000;
     } else {
         v9fs_string_sprintf(&version, "unknown");
     }
diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h
index 622928f..c5b5229 100644
--- a/hw/9pfs/virtio-9p.h
+++ b/hw/9pfs/virtio-9p.h
@@ -94,6 +94,7 @@  enum {
 };
 
 enum p9_proto_version {
+    V9FS_PROTO_2000  = 0x00,
     V9FS_PROTO_2000U = 0x01,
     V9FS_PROTO_2000L = 0x02,
 };