Update the return value of virtio-mmio ops->config_get to return zero
on success rather like the number of bytes read, to align with virtio-pci.
This allows consistent error handling from device driver side.
Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115
for (i = 0; i < len; i++)
ptr[i] = virtio_mmio_cread8(base, offset + i);
- return len;
+ return 0;
}
switch (len) {
uk_pr_warn("Unaligned io read: %d bytes\n", len);
}
- return len;
+ return 0;
}
static int vm_set(struct virtio_dev *vdev, __u16 offset,