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().

Backports commit a18bb417e954ceea0a30b46c38b0d58c3a7ca6a1 from qemu
This commit is contained in:
Andreas Färber 2018-02-12 16:33:13 -05:00 committed by Lioncash
parent 2d07e60f61
commit 15b820e72b
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -1615,7 +1615,7 @@ void object_property_add_alias(Object *obj, const char *name,
} }
op->resolve = property_resolve_alias; op->resolve = property_resolve_alias;
object_property_set_description(obj, name, object_property_set_description(obj, op->name,
target_prop->description, target_prop->description,
&error_abort); &error_abort);