From patchwork Tue Feb 23 06:28:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sripathi Kodi X-Patchwork-Id: 81401 X-Patchwork-Delegate: ericvh@gmail.com Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1N6SSQC026029 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 23 Feb 2010 06:29:07 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NjoFr-0000dh-U8; Tue, 23 Feb 2010 06:28:23 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NjoFq-0000dV-Ji for v9fs-developer@lists.sourceforge.net; Tue, 23 Feb 2010 06:28:22 +0000 Received-SPF: pass (sfi-mx-4.v28.ch3.sourceforge.com: domain of in.ibm.com designates 202.81.31.148 as permitted sender) client-ip=202.81.31.148; envelope-from=sripathik@in.ibm.com; helo=e23smtp06.au.ibm.com; Received: from e23smtp06.au.ibm.com ([202.81.31.148]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NjoFp-0005Ow-Hh for v9fs-developer@lists.sourceforge.net; Tue, 23 Feb 2010 06:28:22 +0000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp06.au.ibm.com (8.14.3/8.13.1) with ESMTP id o1N6SDQG000578 for ; Tue, 23 Feb 2010 17:28:13 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o1N6MknM1564912 for ; Tue, 23 Feb 2010 17:22:46 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o1N6SEsa022522 for ; Tue, 23 Feb 2010 17:28:14 +1100 Received: from localhost ([9.124.35.36]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o1N6SDGc022499 for ; Tue, 23 Feb 2010 17:28:13 +1100 Date: Tue, 23 Feb 2010 11:58:12 +0530 From: Sripathi Kodi To: v9fs-developer@lists.sourceforge.net Message-ID: <20100223115812.356248d7@in.ibm.com> In-Reply-To: <20100223115123.0a60c3cf@in.ibm.com> References: <20100223115123.0a60c3cf@in.ibm.com> X-Mailer: Claws Mail 3.7.4 (GTK+ 2.18.6; i686-redhat-linux-gnu) Mime-Version: 1.0 X-Spam-Score: -4.7 (----) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -4.0 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [202.81.31.148 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.8 AWL AWL: From: address is in the auto white-list X-Headers-End: 1NjoFp-0005Ow-Hh Subject: [V9fs-developer] [PATCH 4/4] 9P2010.L handshake: .L protocol negotiation X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 23 Feb 2010 06:29:07 +0000 (UTC) diff --git a/net/9p/client.c b/net/9p/client.c index bb35df7..e9dd298 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -667,8 +667,25 @@ int p9_client_version(struct p9_client *c) P9_DPRINTK(P9_DEBUG_9P, ">>> TVERSION msize %d protocol %d\n", c->msize, c->proto_version); - req = p9_client_rpc(c, P9_TVERSION, "ds", c->msize, - p9_is_proto_dotu(c) ? "9P2000.u" : "9P2000"); + + switch (c->proto_version) { + case p9_proto_2010L: + req = p9_client_rpc(c, P9_TVERSION, "ds", + c->msize, "9P2010.L"); + break; + case p9_proto_2000u: + req = p9_client_rpc(c, P9_TVERSION, "ds", + c->msize, "9P2000.u"); + break; + case p9_proto_legacy: + req = p9_client_rpc(c, P9_TVERSION, "ds", + c->msize, "9P2000"); + break; + default: + return -EINVAL; + break; + } + if (IS_ERR(req)) return PTR_ERR(req); @@ -680,7 +697,9 @@ int p9_client_version(struct p9_client *c) } P9_DPRINTK(P9_DEBUG_9P, "<<< RVERSION msize %d %s\n", msize, version); - if (! strncmp(version, "9P2000.u", 8)) + if (! strncmp(version, "9P2010.L", 8)) + c->proto_version = p9_proto_2010L; + else if (! strncmp(version, "9P2000.u", 8)) c->proto_version = p9_proto_2000u; else if (! strncmp(version, "9P2000", 6)) c->proto_version = p9_proto_legacy;