提交 84151514 编写于 作者: M M. Mohan Kumar 提交者: Aneesh Kumar K.V

qemu: virtio-9p: Recognize 9P2000.L protocol

Make 9P server recognize 9P2000.L protocol version
Signed-off-by: NM. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: NVenkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
上级 ba5e7f82
...@@ -1025,7 +1025,11 @@ static void v9fs_version(V9fsState *s, V9fsPDU *pdu) ...@@ -1025,7 +1025,11 @@ static void v9fs_version(V9fsState *s, V9fsPDU *pdu)
pdu_unmarshal(pdu, offset, "ds", &msize, &version); 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"); v9fs_string_sprintf(&version, "unknown");
} }
......
...@@ -57,6 +57,11 @@ enum { ...@@ -57,6 +57,11 @@ enum {
P9_QTFILE = 0x00, P9_QTFILE = 0x00,
}; };
enum p9_proto_version {
V9FS_PROTO_2000U = 0x01,
V9FS_PROTO_2000L = 0x02,
};
#define P9_NOTAG (u16)(~0) #define P9_NOTAG (u16)(~0)
#define P9_NOFID (u32)(~0) #define P9_NOFID (u32)(~0)
#define P9_MAXWELEM 16 #define P9_MAXWELEM 16
...@@ -144,6 +149,7 @@ typedef struct V9fsState ...@@ -144,6 +149,7 @@ typedef struct V9fsState
uint16_t tag_len; uint16_t tag_len;
uint8_t *tag; uint8_t *tag;
size_t config_size; size_t config_size;
enum p9_proto_version proto_version;
} V9fsState; } V9fsState;
typedef struct V9fsCreateState { typedef struct V9fsCreateState {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册