qmp: add and use q type specifier
"O" is being used by the transaction and qom-set commands to mean "any QObject", but it really means "do not validate the argument list". Add a new specifier with the correct meaning. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
e38ac9621c
commit
b9f8978cc4
|
@ -4157,6 +4157,9 @@ static int check_client_args_type(const QDict *client_args,
|
||||||
case 'O':
|
case 'O':
|
||||||
assert(flags & QMP_ACCEPT_UNKNOWNS);
|
assert(flags & QMP_ACCEPT_UNKNOWNS);
|
||||||
break;
|
break;
|
||||||
|
case 'q':
|
||||||
|
/* Any QObject can be passed. */
|
||||||
|
break;
|
||||||
case '/':
|
case '/':
|
||||||
case '.':
|
case '.':
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -708,7 +708,7 @@ EQMP
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "transaction",
|
.name = "transaction",
|
||||||
.args_type = "actions:O",
|
.args_type = "actions:q",
|
||||||
.mhandler.cmd_new = qmp_marshal_input_transaction,
|
.mhandler.cmd_new = qmp_marshal_input_transaction,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -2125,7 +2125,7 @@ EQMP
|
||||||
|
|
||||||
{
|
{
|
||||||
.name = "qom-set",
|
.name = "qom-set",
|
||||||
.args_type = "path:s,property:s,opts:O",
|
.args_type = "path:s,property:s,value:q",
|
||||||
.mhandler.cmd_new = qmp_qom_set,
|
.mhandler.cmd_new = qmp_qom_set,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue