OSDN Git Service

qdev: Set the object property's description to the qdev property's.
authorGonglei <arei.gonglei@huawei.com>
Tue, 7 Oct 2014 06:33:22 +0000 (14:33 +0800)
committerAndreas Färber <afaerber@suse.de>
Wed, 15 Oct 2014 03:03:15 +0000 (05:03 +0200)
Set all static qdev properties' descriptions to object property's
description.

Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
hw/core/qdev.c

index 7685e07..a1e9247 100644 (file)
@@ -826,6 +826,11 @@ void qdev_property_add_static(DeviceState *dev, Property *prop,
         error_propagate(errp, local_err);
         return;
     }
+
+    object_property_set_description(obj, prop->name,
+                                    prop->info->description,
+                                    &error_abort);
+
     if (prop->qtype == QTYPE_NONE) {
         return;
     }