提交 92c1ad03 编写于 作者: A Anthony Liguori

virtio-9p: Add P9_TVERSION support

Implement P9_TVERSION support.

[sripathik@in.ibm.com: Handle unknown 9P versions as per the standards]
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
Signed-off-by: NAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 1f5a89bf
......@@ -843,9 +843,20 @@ static void v9fs_dummy(V9fsState *s, V9fsPDU *pdu)
static void v9fs_version(V9fsState *s, V9fsPDU *pdu)
{
if (debug_9p_pdu) {
pprint_pdu(pdu);
int32_t msize;
V9fsString version;
size_t offset = 7;
pdu_unmarshal(pdu, offset, "ds", &msize, &version);
if (strcmp(version.data, "9P2000.u")) {
v9fs_string_sprintf(&version, "unknown");
}
offset += pdu_marshal(pdu, offset, "ds", msize, &version);
complete_pdu(s, pdu, offset);
v9fs_string_free(&version);
}
static void v9fs_attach(V9fsState *s, V9fsPDU *pdu)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册