mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
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:
parent
129955eb14
commit
d1ae87a97a
1 changed files with 2 additions and 2 deletions
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue