From: Andreas Färber Date: Fri, 27 Mar 2015 16:34:10 +0000 (+0100) Subject: qom: Fix object_property_add_alias() with [*] X-Git-Tag: qemu-xen-4.7.0-rc1~370^2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a18bb417e954ceea0a30b46c38b0d58c3a7ca6a1;p=qemu-xen.git qom: Fix object_property_add_alias() with [*] Commit 8074264 (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: Gonglei Acked-by: Paolo Bonzini Cc: Michael S. Tsirkin Cc: qemu-stable@nongnu.org (v2.2+) Signed-off-by: Andreas Färber --- diff --git a/qom/object.c b/qom/object.c index d1670387b4..b8dff43297 100644 --- a/qom/object.c +++ b/qom/object.c @@ -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);