[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 6/8] hw/xen: Use xs_node_read() from xenstore_read_str() instead o
From: |
David Woodhouse |
Subject: |
[PULL 6/8] hw/xen: Use xs_node_read() from xenstore_read_str() instead of open-coding it |
Date: |
Thu, 16 Jan 2025 08:43:30 +0000 |
From: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
---
hw/xen/xen_pvdev.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/xen/xen_pvdev.c b/hw/xen/xen_pvdev.c
index c5ad71e8dc..c9143ba259 100644
--- a/hw/xen/xen_pvdev.c
+++ b/hw/xen/xen_pvdev.c
@@ -22,6 +22,7 @@
#include "qemu/main-loop.h"
#include "hw/qdev-core.h"
#include "hw/xen/xen-legacy-backend.h"
+#include "hw/xen/xen-bus-helper.h"
#include "hw/xen/xen_pvdev.h"
/* private */
@@ -81,12 +82,9 @@ int xenstore_write_str(const char *base, const char *node,
const char *val)
char *xenstore_read_str(const char *base, const char *node)
{
- char abspath[XEN_BUFSIZE];
- unsigned int len;
char *str, *ret = NULL;
- snprintf(abspath, sizeof(abspath), "%s/%s", base, node);
- str = qemu_xen_xs_read(xenstore, 0, abspath, &len);
+ str = xs_node_read(xenstore, 0, NULL, NULL, "%s/%s", base, node);
if (str != NULL) {
/* move to qemu-allocated memory to make sure
* callers can safely g_free() stuff. */
--
2.47.0
- [PULL 0/8] Xen regression fixes and cleanups, David Woodhouse, 2025/01/16
- [PULL 5/8] hw/xen: Use xs_node_read() from xen_netdev_get_name(), David Woodhouse, 2025/01/16
- [PULL 7/8] hw/xen: Fix errp handling in xen_console, David Woodhouse, 2025/01/16
- [PULL 3/8] hw/xen: Use xs_node_read() from xs_node_vscanf(), David Woodhouse, 2025/01/16
- [PULL 8/8] system/runstate: Fix regression, clarify BQL status of exit notifiers, David Woodhouse, 2025/01/16
- [PULL 6/8] hw/xen: Use xs_node_read() from xenstore_read_str() instead of open-coding it,
David Woodhouse <=
- [PULL 4/8] hw/xen: Use xs_node_read() from xen_console_get_name(), David Woodhouse, 2025/01/16
- [PULL 2/8] xen: do not use '%ms' scanf specifier, David Woodhouse, 2025/01/16
- [PULL 1/8] hw/xen: Add xs_node_read() helper function, David Woodhouse, 2025/01/16