|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 1/2] hw/xen: Add xs_node_read() helper function
On 10/1/25 10:35, Roger Pau Monne wrote: From: David Woodhouse <dwmw@xxxxxxxxxxxx> This returns the full contents of the node, having created the node path from the printf-style format string provided in its arguments. This will save various callers from having to do so for themselves (and from using xs_node_scanf() with the non-portable %ms format string. Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx> [remove double newline and constify trace parameters] Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> Cc: Anthony PERARD <anthony@xxxxxxxxxxxxxx> Cc: Paul Durrant <paul@xxxxxxx> Cc: "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxx> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx --- hw/xen/trace-events | 1 + hw/xen/xen-bus-helper.c | 22 ++++++++++++++++++++++ include/hw/xen/xen-bus-helper.h | 4 ++++ 3 files changed, 27 insertions(+) diff --git a/hw/xen/trace-events b/hw/xen/trace-events index a07fe41c6d3b..461dee7b239f 100644 --- a/hw/xen/trace-events +++ b/hw/xen/trace-events @@ -39,6 +39,7 @@ xs_node_create(const char *node) "%s" xs_node_destroy(const char *node) "%s" xs_node_vprintf(char *path, char *value) "%s %s" xs_node_vscanf(char *path, char *value) "%s %s" +xs_node_read(const char *path, const char *value) "%s %s" xs_node_watch(char *path) "%s" xs_node_unwatch(char *path) "%s"diff --git a/hw/xen/xen-bus-helper.c b/hw/xen/xen-bus-helper.c Alternatively use g_autofree.
While I suppose the same comment still applies here ("/* Read from
node/key unless node is empty, in which case read from key */"), it
would be nice to precise the returned value.
+char *xs_node_read(struct qemu_xs_handle *h, xs_transaction_t tid, + unsigned int *len, Error **errp, + const char *node_fmt, ...) + G_GNUC_PRINTF(5, 6);/* Watch node/key unless node is empty, in which case watch key */struct qemu_xs_watch *xs_node_watch(struct qemu_xs_handle *h, const char *node, Mostly nitpicking, otherwise patch LGTM.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |