Re: [PATCH 04/14] qemu: Generalize filtering in qemuMonitorJSONParsePropsList

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a Thursday in 2025, Jiri Denemark via Devel wrote:
From: Jiri Denemark <jdenemar@xxxxxxxxxx>

qemuMonitorJSONParsePropsList supported filtering based on type. Let's
replace it with a callback supplied by the caller to allow for more
advanced filtering.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
src/qemu/qemu_monitor_json.c | 51 +++++++++++++++++++++++++++++-------
1 file changed, 41 insertions(+), 10 deletions(-)

diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 6402d18d37..0c78115e9d 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -5837,10 +5837,21 @@ int qemuMonitorJSONSetObjectProperty(qemuMonitor *mon,
#undef MAKE_SET_CMD


+/* A filter callback for qemuMonitorJSONParsePropsList.
+ *
+ * Returns 0 if the property should be included in the list,
+ *         1 if the property should be ignored,

I would expect these two to be switched, but could not find a filtering
function that can also return an error

(The CheckACL ones return bool)

Jano

+ *        -1 on error.
+ */

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux