summary refs log tree commit diff stats
path: root/include/hw/xen
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@citrix.com>2025-01-10 10:35:31 +0100
committerDavid Woodhouse <dwmw@amazon.co.uk>2025-01-15 17:06:49 +0000
commit7a0b74d8716836f1206c5dfd778984c5d6eee46b (patch)
treee4c8e9a6de9460fb4a303ef6971c1ab8ac26c7fc /include/hw/xen
parente6cdeee95990a2c6f5d6873d3afb3c90518aed5c (diff)
downloadfocaccia-qemu-7a0b74d8716836f1206c5dfd778984c5d6eee46b.tar.gz
focaccia-qemu-7a0b74d8716836f1206c5dfd778984c5d6eee46b.zip
xen: do not use '%ms' scanf specifier
The 'm' parameter used to request auto-allocation of the destination variable
is not supported on FreeBSD, and as such leads to failures to parse.

What's more, the current usage of '%ms' with xs_node_scanf() is pointless, as
it just leads to a double allocation of the same string.  Instead use
xs_node_read() to read the whole xenstore node.

Fixes: a783f8ad4ec9 ('xen: add a mechanism to automatically create XenDevice-s...')
Fixes: 9b7737469080 ('hw/xen: update Xen console to XenDevice model')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Diffstat (limited to 'include/hw/xen')
-rw-r--r--include/hw/xen/xen-bus.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/xen/xen-bus.h b/include/hw/xen/xen-bus.h
index 38d40afa37..2adb2af839 100644
--- a/include/hw/xen/xen-bus.h
+++ b/include/hw/xen/xen-bus.h
@@ -91,6 +91,7 @@ void xen_device_frontend_printf(XenDevice *xendev, const char *key,
 int xen_device_frontend_scanf(XenDevice *xendev, const char *key,
                               const char *fmt, ...)
     G_GNUC_SCANF(3, 4);
+char *xen_device_frontend_read(XenDevice *xendev, const char *key);
 
 void xen_device_set_max_grant_refs(XenDevice *xendev, unsigned int nr_refs,
                                    Error **errp);