From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33302 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHYRQ-0001Mi-U7 for qemu-devel@nongnu.org; Thu, 27 May 2010 04:27:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHYRP-0001jt-SH for qemu-devel@nongnu.org; Thu, 27 May 2010 04:27:48 -0400 Received: from e28smtp02.in.ibm.com ([122.248.162.2]:36170) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHYRN-0001iA-80 for qemu-devel@nongnu.org; Thu, 27 May 2010 04:27:47 -0400 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by e28smtp02.in.ibm.com (8.14.3/8.13.1) with ESMTP id o4R8RXxj017895 for ; Thu, 27 May 2010 13:57:33 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o4R8RTjP3227756 for ; Thu, 27 May 2010 13:57:32 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o4R8RTn4017992 for ; Thu, 27 May 2010 18:27:29 +1000 Received: from localhost.localdomain (K50wks273869wss.in.ibm.com [9.124.35.31]) by d28av05.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o4R8RTf0017989 for ; Thu, 27 May 2010 18:27:29 +1000 From: "M. Mohan Kumar" Date: Thu, 27 May 2010 13:57:29 +0530 Message-Id: <1274948849-29529-1-git-send-email-mohan@in.ibm.com> Subject: [Qemu-devel] [PATCH] qemu: virtio-9p: Recognize 9P2000.L protocol List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Qemu-development List Make 9P server recognize 9P2000.L protocol version Signed-off-by: M. Mohan Kumar --- 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