[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/10] qom/object: register 'type' property as class
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH 04/10] qom/object: register 'type' property as class property |
Date: |
Thu, 6 Sep 2018 19:12:21 +0400 |
Signed-off-by: Marc-André Lureau <address@hidden>
---
qom/object.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/qom/object.c b/qom/object.c
index d8666de3f2..185d1dd9f8 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -2423,9 +2423,10 @@ void object_class_property_set_description(ObjectClass
*klass,
op->description = g_strdup(description);
}
-static void object_instance_init(Object *obj)
+static void object_class_init(ObjectClass *klass, void *data)
{
- object_property_add_str(obj, "type", qdev_get_type, NULL, NULL);
+ object_class_property_add_str(klass, "type", qdev_get_type,
+ NULL, &error_abort);
}
static void register_types(void)
@@ -2439,7 +2440,7 @@ static void register_types(void)
static TypeInfo object_info = {
.name = TYPE_OBJECT,
.instance_size = sizeof(Object),
- .instance_init = object_instance_init,
+ .class_init = object_class_init,
.abstract = true,
};
--
2.19.0.rc1
- [Qemu-devel] [PATCH 00/10] Various qemu command line options help improvements, Marc-André Lureau, 2018/09/06
- [Qemu-devel] [PATCH 01/10] qemu-option: add help fallback to print the list of options, Marc-André Lureau, 2018/09/06
- [Qemu-devel] [PATCH 03/10] qom/object: fix iterating properties over a class, Marc-André Lureau, 2018/09/06
- [Qemu-devel] [PATCH 02/10] qemu-option: improve qemu_opts_print_help() output, Marc-André Lureau, 2018/09/06
- [Qemu-devel] [PATCH 04/10] qom/object: register 'type' property as class property,
Marc-André Lureau <=
- [Qemu-devel] [PATCH 06/10] tests/qom-proplist: check properties are not listed multiple times, Marc-André Lureau, 2018/09/06
- [Qemu-devel] [PATCH 07/10] tests/qom-proplist: check class properties iterator, Marc-André Lureau, 2018/09/06
- [Qemu-devel] [PATCH 08/10] vl: handle -object ?, Marc-André Lureau, 2018/09/06
- [Qemu-devel] [PATCH 05/10] tests/qom-proplist: check duplicate "bv" property registration failed, Marc-André Lureau, 2018/09/06
- [Qemu-devel] [PATCH 09/10] hostmem: add some properties description, Marc-André Lureau, 2018/09/06
- [Qemu-devel] [PATCH 10/10] vl: list user creatable propeties if '?' as argument, Marc-André Lureau, 2018/09/06