From: Juergen Gross <jgross@suse.com>
To: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org
Cc: samuel.thibault@ens-lyon.org, wl@xen.org,
Juergen Gross <jgross@suse.com>
Subject: [PATCH 3/3] Mini-OS: fix 9pfs stat receive format
Date: Wed, 1 Nov 2023 10:00:24 +0100 [thread overview]
Message-ID: <20231101090024.28934-4-jgross@suse.com> (raw)
In-Reply-To: <20231101090024.28934-1-jgross@suse.com>
The format string of the received data for the 9pfs stat command is
missing the initial 2 byte total length specifier. Add it.
Fixes: 2d1dfccd3aa3 ("Mini-OS: add read and write support to 9pfsfront")
Signed-off-by: Juergen Gross <jgross@suse.com>
---
9pfront.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/9pfront.c b/9pfront.c
index 5da8a365..43c7409f 100644
--- a/9pfront.c
+++ b/9pfront.c
@@ -711,6 +711,7 @@ static int p9_create(struct dev_9pfs *dev, uint32_t fid, char *path,
static int p9_stat(struct dev_9pfs *dev, uint32_t fid, struct p9_stat *stat)
{
struct req *req = get_free_req(dev);
+ uint16_t total;
int ret;
if ( !req )
@@ -719,10 +720,10 @@ static int p9_stat(struct dev_9pfs *dev, uint32_t fid, struct p9_stat *stat)
memset(stat, 0, sizeof(*stat));
req->cmd = P9_CMD_STAT;
send_9p(dev, req, "U", fid);
- rcv_9p(dev, req, "uuUQUUULSSSSSUUU", &stat->size, &stat->type, &stat->dev,
- stat->qid, &stat->mode, &stat->atime, &stat->mtime, &stat->length,
- &stat->name, &stat->uid, &stat->gid, &stat->muid, &stat->extension,
- &stat->n_uid, &stat->n_gid, &stat->n_muid);
+ rcv_9p(dev, req, "uuuUQUUULSSSSSUUU", &total, &stat->size, &stat->type,
+ &stat->dev, stat->qid, &stat->mode, &stat->atime, &stat->mtime,
+ &stat->length, &stat->name, &stat->uid, &stat->gid, &stat->muid,
+ &stat->extension, &stat->n_uid, &stat->n_gid, &stat->n_muid);
ret = req->result;
--
2.35.3
next prev parent reply other threads:[~2023-11-01 9:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 9:00 [PATCH 0/3] Mini-OS: preparations for 9pfs in xenstore-stubdom Juergen Gross
2023-11-01 9:00 ` [PATCH 1/3] Mini-OS: make xenstore_buf externally visible Juergen Gross
2023-11-01 13:23 ` Jason Andryuk
2023-11-01 9:00 ` [PATCH 2/3] Mini-OS: don't crash if no shutdown node is available Juergen Gross
2023-11-01 13:23 ` Jason Andryuk
2023-11-01 16:38 ` Andrew Cooper
2023-11-01 16:42 ` Juergen Gross
2023-11-01 16:57 ` Andrew Cooper
2023-11-02 7:14 ` Juergen Gross
2023-11-01 9:00 ` Juergen Gross [this message]
2023-11-01 13:25 ` [PATCH 3/3] Mini-OS: fix 9pfs stat receive format Jason Andryuk
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=20231101090024.28934-4-jgross@suse.com \
--to=jgross@suse.com \
--cc=minios-devel@lists.xenproject.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.