From: David Gibson <david@gibson.dropbear.id.au>
To: jvrao@linux.vnet.ibm.com
Cc: trule@linux.vnet.ibm.com, rusty@rustcorp.com.au,
qemu-devel@nongnu.org, thuth@de.ibm.com
Subject: [Qemu-devel] [PATCH] 9pfs: Stat response from server offset by 2 bytes
Date: Tue, 8 Nov 2011 16:55:17 +1100 [thread overview]
Message-ID: <1320731717-903-1-git-send-email-david@gibson.dropbear.id.au> (raw)
From: Timothy Rule <trule@linux.vnet.ibm.com>
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 <trule@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
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
next reply other threads:[~2011-11-08 5:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 5:55 David Gibson [this message]
2011-11-08 13:39 ` [Qemu-devel] [PATCH] 9pfs: Stat response from server offset by 2 bytes Aneesh Kumar K.V
2011-11-08 14:32 ` Tim Rule
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1320731717-903-1-git-send-email-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=jvrao@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
--cc=thuth@de.ibm.com \
--cc=trule@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).