]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/xen: Fix errp handling in xen_console
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 15 Jan 2025 15:46:06 +0000 (15:46 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 15 Jan 2025 17:09:11 +0000 (17:09 +0000)
commit8b44a3e39f36540818d99ef8cf79e64bba1ed9c3
tree499a2294611a728a8d8db22847c23629973b44cd
parentcd414c3f566fdbd98778c1c9a497428a80cd7fdd
hw/xen: Fix errp handling in xen_console

When attempting to read the 'output' node, interpret any error *other*
than ENOENT as a fatal error. For ENOENT, fall back to serial_hd() to
find a character device, or create a null device.

Do not attempt to prepend to errp when serial_hd() fails; the error
isn't relevant (and prior to this change, wasn't set anyway).

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
hw/char/xen_console.c