mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-03-04 09:04:39 -07:00
hw/xen: Add "mode" parameter to xen-block devices
Block devices don't work in PV Grub (0.9x) if there is no mode specified. It complains: "Error ENOENT when reading the mode" Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Message-Id: <20250207143724.30792-2-dwmw2@infradead.org> Signed-off-by: Anthony PERARD <anthony.perard@vates.tech>
This commit is contained in:
parent
cfcacbab38
commit
4173b3d837
1 changed files with 2 additions and 0 deletions
|
|
@ -408,6 +408,8 @@ static void xen_block_realize(XenDevice *xendev, Error **errp)
|
|||
}
|
||||
|
||||
xen_device_backend_printf(xendev, "info", "%u", blockdev->info);
|
||||
xen_device_backend_printf(xendev, "mode",
|
||||
(blockdev->info & VDISK_READONLY) ? "r" : "w");
|
||||
|
||||
xen_device_frontend_printf(xendev, "virtual-device", "%lu",
|
||||
vdev->number);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue