[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] 9pfs: Stat response from server offset by 2 bytes
From: |
David Gibson |
Subject: |
[Qemu-devel] [PATCH] 9pfs: Stat response from server offset by 2 bytes |
Date: |
Tue, 8 Nov 2011 16:55:17 +1100 |
From: Timothy Rule <address@hidden>
The 9P spec states that for the stat message the "stat[n]" structure shall be
encoded at offset 7 in the 9P message (see ยง13.9 message Rstat).
The existing code is encoding a 2 byte value (hard coded 0 value) at
offset 7 of the 9P message, and then follows with the "stat[n]" structure
at offset 9 of the 9P message.
This patch removes the encoding of the 2 byte value which has the effect
of moving the "stat[n]" structure from offset 9 to offset 7 in the 9P
message Rstat.
Signed-off-by: Timothy Rule <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/9pfs/virtio-9p.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index 01cf337..35d8851 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -1279,7 +1279,7 @@ static void v9fs_stat(void *opaque)
if (err < 0) {
goto out;
}
- offset += pdu_marshal(pdu, offset, "wS", 0, &v9stat);
+ offset += pdu_marshal(pdu, offset, "S", &v9stat);
err = offset;
trace_v9fs_stat_return(pdu->tag, pdu->id, v9stat.mode,
v9stat.atime, v9stat.mtime, v9stat.length);
--
1.7.7.1
- [Qemu-devel] [PATCH] 9pfs: Stat response from server offset by 2 bytes,
David Gibson <=