Revision 84151514
b/hw/virtio-9p.c | ||
---|---|---|
1025 | 1025 |
|
1026 | 1026 |
pdu_unmarshal(pdu, offset, "ds", &msize, &version); |
1027 | 1027 |
|
1028 |
if (strcmp(version.data, "9P2000.u")) { |
|
1028 |
if (!strcmp(version.data, "9P2000.u")) { |
|
1029 |
s->proto_version = V9FS_PROTO_2000U; |
|
1030 |
} else if (!strcmp(version.data, "9P2000.L")) { |
|
1031 |
s->proto_version = V9FS_PROTO_2000L; |
|
1032 |
} else { |
|
1029 | 1033 |
v9fs_string_sprintf(&version, "unknown"); |
1030 | 1034 |
} |
1031 | 1035 |
|
b/hw/virtio-9p.h | ||
---|---|---|
57 | 57 |
P9_QTFILE = 0x00, |
58 | 58 |
}; |
59 | 59 |
|
60 |
enum p9_proto_version { |
|
61 |
V9FS_PROTO_2000U = 0x01, |
|
62 |
V9FS_PROTO_2000L = 0x02, |
|
63 |
}; |
|
64 |
|
|
60 | 65 |
#define P9_NOTAG (u16)(~0) |
61 | 66 |
#define P9_NOFID (u32)(~0) |
62 | 67 |
#define P9_MAXWELEM 16 |
... | ... | |
144 | 149 |
uint16_t tag_len; |
145 | 150 |
uint8_t *tag; |
146 | 151 |
size_t config_size; |
152 |
enum p9_proto_version proto_version; |
|
147 | 153 |
} V9fsState; |
148 | 154 |
|
149 | 155 |
typedef struct V9fsCreateState { |
Also available in: Unified diff