From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53601 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oby7P-0004vI-IW for qemu-devel@nongnu.org; Thu, 22 Jul 2010 11:55:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oby7N-0001Xr-4n for qemu-devel@nongnu.org; Thu, 22 Jul 2010 11:55:31 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:42499) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oby7M-0001Xa-Qf for qemu-devel@nongnu.org; Thu, 22 Jul 2010 11:55:29 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e32.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o6MFlVlQ021596 for ; Thu, 22 Jul 2010 09:47:31 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o6MFtGh1080208 for ; Thu, 22 Jul 2010 09:55:19 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o6MFtBuo031139 for ; Thu, 22 Jul 2010 09:55:14 -0600 From: "Venkateswararao Jujjuri (JV)" Date: Thu, 22 Jul 2010 08:57:48 -0700 Message-Id: <1279814291-8301-2-git-send-email-jvrao@linux.vnet.ibm.com> In-Reply-To: <1279814291-8301-1-git-send-email-jvrao@linux.vnet.ibm.com> References: <1279814291-8301-1-git-send-email-jvrao@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH-V3 01/24] 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-devel@nongnu.org Cc: aliguori@us.ibm.com, "M. Mohan Kumar" , Venkateswararao Jujjuri From: M. Mohan Kumar Make 9P server recognize 9P2000.L protocol version Signed-off-by: M. Mohan Kumar Signed-off-by: Venkateswararao Jujjuri --- 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