Commit c5a7697d authored by Sripathi Kodi's avatar Sripathi Kodi Committed by Eric Van Hensbergen

9P2010.L handshake: .L protocol negotiation

This patch adds 9P2010.L protocol negotiation with the server
Signed-off-by: default avatarSripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
parent 342fee1d
...@@ -670,8 +670,25 @@ int p9_client_version(struct p9_client *c) ...@@ -670,8 +670,25 @@ int p9_client_version(struct p9_client *c)
P9_DPRINTK(P9_DEBUG_9P, ">>> TVERSION msize %d protocol %d\n", P9_DPRINTK(P9_DEBUG_9P, ">>> TVERSION msize %d protocol %d\n",
c->msize, c->proto_version); 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)) if (IS_ERR(req))
return PTR_ERR(req); return PTR_ERR(req);
...@@ -683,7 +700,9 @@ int p9_client_version(struct p9_client *c) ...@@ -683,7 +700,9 @@ int p9_client_version(struct p9_client *c)
} }
P9_DPRINTK(P9_DEBUG_9P, "<<< RVERSION msize %d %s\n", msize, version); 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; c->proto_version = p9_proto_2000u;
else if (!strncmp(version, "9P2000", 6)) else if (!strncmp(version, "9P2000", 6))
c->proto_version = p9_proto_legacy; c->proto_version = p9_proto_legacy;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment