提交 e0300f92 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 3460fef5
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册