Revision 8f4d1ca5 hw/virtio-9p.c
b/hw/virtio-9p.c | ||
---|---|---|
844 | 844 |
int8_t id = pdu->id + 1; /* Response */ |
845 | 845 |
|
846 | 846 |
if (len < 0) { |
847 |
V9fsString str; |
|
848 | 847 |
int err = -len; |
848 |
len = 7; |
|
849 | 849 |
|
850 |
str.data = strerror(err); |
|
851 |
str.size = strlen(str.data); |
|
850 |
if (s->proto_version != V9FS_PROTO_2000L) { |
|
851 |
V9fsString str; |
|
852 |
|
|
853 |
str.data = strerror(err); |
|
854 |
str.size = strlen(str.data); |
|
855 |
|
|
856 |
len += pdu_marshal(pdu, len, "s", &str); |
|
857 |
id = P9_RERROR; |
|
858 |
} |
|
852 | 859 |
|
853 |
len = 7; |
|
854 |
len += pdu_marshal(pdu, len, "s", &str); |
|
855 | 860 |
len += pdu_marshal(pdu, len, "d", err); |
856 | 861 |
|
857 |
id = P9_RERROR; |
|
862 |
if (s->proto_version == V9FS_PROTO_2000L) { |
|
863 |
id = P9_RLERROR; |
|
864 |
} |
|
858 | 865 |
} |
859 | 866 |
|
860 | 867 |
/* fill out the header */ |
Also available in: Unified diff