mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
qapi/qom: Drop deprecated 'props' from object-add
The option has been deprecated in QEMU 5.0, remove it. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
9695c3af3a
commit
5024340745
4 changed files with 6 additions and 31 deletions
|
@ -225,27 +225,6 @@ ObjectPropertyInfoList *qmp_qom_list_properties(const char *typename,
|
|||
|
||||
void qmp_object_add(QDict *qdict, QObject **ret_data, Error **errp)
|
||||
{
|
||||
QObject *props;
|
||||
QDict *pdict;
|
||||
|
||||
props = qdict_get(qdict, "props");
|
||||
if (props) {
|
||||
pdict = qobject_to(QDict, props);
|
||||
if (!pdict) {
|
||||
error_setg(errp, QERR_INVALID_PARAMETER_TYPE, "props", "dict");
|
||||
return;
|
||||
}
|
||||
qobject_ref(pdict);
|
||||
qdict_del(qdict, "props");
|
||||
qdict_join(qdict, pdict, false);
|
||||
if (qdict_size(pdict) != 0) {
|
||||
error_setg(errp, "Option in 'props' conflicts with top level");
|
||||
qobject_unref(pdict);
|
||||
return;
|
||||
}
|
||||
qobject_unref(pdict);
|
||||
}
|
||||
|
||||
user_creatable_add_dict(qdict, false, errp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue