mirror of https://gitee.com/openkylin/libvirt.git
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