[PATCH v2 19/31] qapi/qom: QAPIfy object-add
Paolo Bonzini
pbonzini at redhat.com
Fri Feb 26 11:30:55 UTC 2021
On 24/02/21 14:52, Kevin Wolf wrote:
> + v = qobject_output_visitor_new(&qobj);
> + visit_type_ObjectOptions(v, NULL, &options, &error_abort);
> + visit_complete(v, &qobj);
> + visit_free(v);
> +
> + props = qobject_to(QDict, qobj);
> + qdict_del(props, "qom-type");
> + qdict_del(props, "id");
> +
> + v = qobject_input_visitor_new(QOBJECT(props));
> + obj = user_creatable_add_type(ObjectType_str(options->qom_type),
> + options->id, props, v, errp);
> + object_unref(obj);
Please add a check in object_property_add_child that the id is well
formed (using the id_wellformed function). This is pre-existing, but it
becomes a regression for -object later in the series.
Thanks,
Paolo
More information about the libvir-list
mailing list