提交 a18bb417 编写于 作者: A Andreas Färber

qom: Fix object_property_add_alias() with [*]

Commit 80742642 (qom: Add description field in ObjectProperty struct)
introduced property descriptions and copied them for alias properties.

Instead of using the caller-supplied property name, use the returned
property name for setting the description. This avoids an Error when
setting a property description for a property with literal "[*]" that
doesn't exist due to automatic property naming in object_property_add().
Reviewed-by: NGonglei <arei.gonglei@huawei.com>
Acked-by: NPaolo Bonzini <pbonzini@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: qemu-stable@nongnu.org (v2.2+)
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 adbeb458
......@@ -1761,7 +1761,7 @@ void object_property_add_alias(Object *obj, const char *name,
}
op->resolve = property_resolve_alias;
object_property_set_description(obj, name,
object_property_set_description(obj, op->name,
target_prop->description,
&error_abort);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册