[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 04/20] qmp: Use ObjectProperty.type if present
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PATCH v4 04/20] qmp: Use ObjectProperty.type if present |
Date: |
Fri, 14 Jul 2017 10:14:53 +0800 |
The dynamic value is more informative in the case of link property,
otherwise it is the same.
Signed-off-by: Fam Zheng <address@hidden>
---
qmp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/qmp.c b/qmp.c
index 133fdfc..9f8a167 100644
--- a/qmp.c
+++ b/qmp.c
@@ -496,7 +496,8 @@ static DevicePropertyInfo
*make_device_property_info(ObjectClass *klass,
info = g_malloc0(sizeof(*info));
info->name = g_strdup(prop->name);
- info->type = g_strdup(prop->info->name);
+ info->type = default_type ? g_strdup(default_type)
+ : g_strdup(prop->info->name);
info->has_description = !!prop->info->description;
info->description = g_strdup(prop->info->description);
return info;
--
2.9.4
- [Qemu-devel] [PATCH v4 00/20] qdev: Introduce DEFINE_PROP_LINK, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 01/20] qom: enforce readonly nature of link's check callback, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 03/20] qdev: Introduce DEFINE_PROP_LINK, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 02/20] qdev: Introduce PropertyInfo.create, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 04/20] qmp: Use ObjectProperty.type if present,
Fam Zheng <=
- [Qemu-devel] [PATCH v4 05/20] qdev: Add const qualifier to PropertyInfo definitions, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 06/20] virtio-blk: Convert to DEFINE_PROP_LINK, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 07/20] virtio-scsi: Convert to DEFINE_PROP_LINK, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 08/20] virtio-rng: Convert to DEFINE_PROP_LINK, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 09/20] virtio-crypto: Convert to DEFINE_PROP_LINK, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 10/20] dimm: Convert to DEFINE_PROP_LINK, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 11/20] ivshmem: Convert to DEFINE_PROP_LINK, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 12/20] armv7m: Convert bitband.source-mamory to DEFINE_PROP_LINK, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 13/20] armv7m: Convert armv7m.memory to DEFINE_PROP_LINK, Fam Zheng, 2017/07/13
- [Qemu-devel] [PATCH v4 14/20] gicv3: Convert to DEFINE_PROP_LINK, Fam Zheng, 2017/07/13