mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-31 18:15:25 +00:00
qemu: qapi: Add support for command features
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@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
3460fef5a0
commit
e0300f92fc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user