fs/9pfs: use virtio_read_config_bytes() to read the tag in config space

Follow the virtio spec, should use size matched operation to read virtio
config space.

Signed-off-by: wangxingxing <wangxingxing@xiaomi.com>
This commit is contained in:
wangxingxing 2025-06-27 22:12:09 +08:00 committed by Alan C. Assis
parent 129955eb14
commit d1ae87a97a

View file

@ -242,8 +242,8 @@ static int virtio_9p_probe(FAR struct virtio_device *vdev)
virtio_read_config_member(vdev, struct virtio_9p_config_s, tag_len,
&config.tag_len);
virtio_read_config(vdev, offsetof(struct virtio_9p_config_s, tag),
&config.tag, config.tag_len);
virtio_read_config_bytes(vdev, offsetof(struct virtio_9p_config_s, tag),
&config.tag, config.tag_len);
config.tag[config.tag_len] = '\0';
if (strcmp(config.tag, priv->tag))
{