diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index 484f274c6334752379c14e855973420fdbd867b1..8e66f9f180d34b951c8ce4d664973c64ecc013ba 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;