aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSripathi Kodi <sripathik@in.ibm.com>2010-03-05 13:51:04 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2010-03-05 16:04:42 -0500
commitc5a7697da9775f7a0e122fa23180becc311772d1 (patch)
treec1113133d1f99cb00a636780242a4c99810b540e /net
parent342fee1d5c7dfa05f4e14ec1e583df4553b09776 (diff)
9P2010.L handshake: .L protocol negotiation
This patch adds 9P2010.L protocol negotiation with the server Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/9p/client.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 9994676e57da..bde9f3d38c57 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -670,8 +670,25 @@ int p9_client_version(struct p9_client *c)
670 670
671 P9_DPRINTK(P9_DEBUG_9P, ">>> TVERSION msize %d protocol %d\n", 671 P9_DPRINTK(P9_DEBUG_9P, ">>> TVERSION msize %d protocol %d\n",
672 c->msize, c->proto_version); 672 c->msize, c->proto_version);
673 req = p9_client_rpc(c, P9_TVERSION, "ds", c->msize, 673
674 p9_is_proto_dotu(c) ? "9P2000.u" : "9P2000"); 674 switch (c->proto_version) {
675 case p9_proto_2010L:
676 req = p9_client_rpc(c, P9_TVERSION, "ds",
677 c->msize, "9P2010.L");
678 break;
679 case p9_proto_2000u:
680 req = p9_client_rpc(c, P9_TVERSION, "ds",
681 c->msize, "9P2000.u");
682 break;
683 case p9_proto_legacy:
684 req = p9_client_rpc(c, P9_TVERSION, "ds",
685 c->msize, "9P2000");
686 break;
687 default:
688 return -EINVAL;
689 break;
690 }
691
675 if (IS_ERR(req)) 692 if (IS_ERR(req))
676 return PTR_ERR(req); 693 return PTR_ERR(req);
677 694
@@ -683,7 +700,9 @@ int p9_client_version(struct p9_client *c)
683 } 700 }
684 701
685 P9_DPRINTK(P9_DEBUG_9P, "<<< RVERSION msize %d %s\n", msize, version); 702 P9_DPRINTK(P9_DEBUG_9P, "<<< RVERSION msize %d %s\n", msize, version);
686 if (!strncmp(version, "9P2000.u", 8)) 703 if (!strncmp(version, "9P2010.L", 8))
704 c->proto_version = p9_proto_2010L;
705 else if (!strncmp(version, "9P2000.u", 8))
687 c->proto_version = p9_proto_2000u; 706 c->proto_version = p9_proto_2000u;
688 else if (!strncmp(version, "9P2000", 6)) 707 else if (!strncmp(version, "9P2000", 6))
689 c->proto_version = p9_proto_legacy; 708 c->proto_version = p9_proto_legacy;