The top level commands now can have 'feature' flags for fixes so add support for querying those as well. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_qapi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 484f274c63..8e66f9f180 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c @@ -216,6 +216,21 @@ virQEMUQAPISchemaTraverseCommand(virJSONValuePtr cur, { const char *query = virQEMUQAPISchemaTraverseContextNextQuery(ctxt); const char *querytype; + char modifier = *query; + + if (!c_isalpha(modifier)) + query++; + + /* exit on modifers for other types */ + if (modifier == '^' || modifier == '!' || modifier == '+' || modifier == '*') + return 0; + + if (modifier == '$') { + if (virQEMUQAPISchemaTraverseContextHasNextQuery(ctxt)) + return -3; + + return virQEMUQAPISchemaTraverseHasObjectFeature(query, cur); + } if (!(querytype = virJSONValueObjectGetString(cur, query))) return 0; -- 2.23.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list