On Mon, Apr 15, 2019 at 06:02:00PM +0200, Peter Krempa wrote:
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_qapi.c | 88 ++++++++++++++++++++++----------------------
1 file changed, 43 insertions(+), 45 deletions(-)
diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c
index 23cbac4405..2652061f4e 100644
--- a/src/qemu/qemu_qapi.c
+++ b/src/qemu/qemu_qapi.c
@@ -107,68 +107,66 @@ virQEMUQAPISchemaTraverse(const char *baseName,
[...]
+ "name",
curtype);
- if (!baseName)
+ if (modifier == '*' &&
+ !virJSONValueObjectHasKey(obj, "default"))
return 0;
- } else if (STREQ(metatype, "command") ||
- STREQ(metatype, "event")) {
- if (!(baseName = virJSONValueObjectGetString(base, *query)))
- return 0;
Nice that we no longer "modify" this argument passed by value.
- } else {
- /* alternates, basic types and enums can't be entered */
- return 0;
- }
+ querytype = virQEMUQAPISchemaTypeFromObject(obj);
+ }
query++;
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano