summaryrefslogtreecommitdiff
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-04 11:17:51 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-27 10:50:39 -0600
commitf79f2bfc6aae76718652f0b3e15a849f7b58104a (patch)
treebe827c0b6a7ff5e2a521fd5d604773e8f079413c /hw/qdev.c
parent30fbb9fc7cd73abc32ff71ceb59e9a3be37ac128 (diff)
downloadqemu-f79f2bfc6aae76718652f0b3e15a849f7b58104a.tar.gz
qdev: don't access name through info
We already have a QOM interface for this so let's use it. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index 49d26a28b3..5da94a8175 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -720,7 +720,7 @@ static void qbus_list_bus(DeviceState *dev)
const char *sep = " ";
error_printf("child busses at \"%s\":",
- dev->id ? dev->id : qdev_get_info(dev)->name);
+ dev->id ? dev->id : object_get_typename(OBJECT(dev)));
QLIST_FOREACH(child, &dev->child_bus, sibling) {
error_printf("%s\"%s\"", sep, child->name);
sep = ", ";
@@ -735,7 +735,7 @@ static void qbus_list_dev(BusState *bus)
error_printf("devices at \"%s\":", bus->name);
QTAILQ_FOREACH(dev, &bus->children, sibling) {
- error_printf("%s\"%s\"", sep, qdev_get_info(dev)->name);
+ error_printf("%s\"%s\"", sep, object_get_typename(OBJECT(dev)));
if (dev->id)
error_printf("/\"%s\"", dev->id);
sep = ", ";
@@ -771,7 +771,7 @@ static DeviceState *qbus_find_dev(BusState *bus, char *elem)
}
}
QTAILQ_FOREACH(dev, &bus->children, sibling) {
- if (strcmp(qdev_get_info(dev)->name, elem) == 0) {
+ if (strcmp(object_get_typename(OBJECT(dev)), elem) == 0) {
return dev;
}
}
@@ -978,7 +978,7 @@ static void qdev_print_props(Monitor *mon, DeviceState *dev, Property *props,
static void qdev_print(Monitor *mon, DeviceState *dev, int indent)
{
BusState *child;
- qdev_printf("dev: %s, id \"%s\"\n", qdev_get_info(dev)->name,
+ qdev_printf("dev: %s, id \"%s\"\n", object_get_typename(OBJECT(dev)),
dev->id ? dev->id : "");
indent += 2;
if (dev->num_gpio_in) {
@@ -1068,7 +1068,7 @@ static int qdev_get_fw_dev_path_helper(DeviceState *dev, char *p, int size)
l += snprintf(p + l, size - l, "%s", d);
g_free(d);
} else {
- l += snprintf(p + l, size - l, "%s", qdev_get_info(dev)->name);
+ l += snprintf(p + l, size - l, "%s", object_get_typename(OBJECT(dev)));
}
}
l += snprintf(p + l , size - l, "/");
@@ -1090,7 +1090,7 @@ char* qdev_get_fw_dev_path(DeviceState *dev)
char *qdev_get_type(DeviceState *dev, Error **errp)
{
- return g_strdup(qdev_get_info(dev)->name);
+ return g_strdup(object_get_typename(OBJECT(dev)));
}
void qdev_ref(DeviceState *dev)
@@ -1300,7 +1300,7 @@ void qdev_property_add_child(DeviceState *dev, const char *name,
{
gchar *type;
- type = g_strdup_printf("child<%s>", qdev_get_info(child)->name);
+ type = g_strdup_printf("child<%s>", object_get_typename(OBJECT(child)));
qdev_property_add(dev, name, type, qdev_get_child_property,
NULL, qdev_release_child_property,
@@ -1352,7 +1352,7 @@ static void qdev_set_link_property(DeviceState *dev, Visitor *v, void *opaque,
if (target) {
gchar *target_type;
- target_type = g_strdup_printf("link<%s>", qdev_get_info(target)->name);
+ target_type = g_strdup_printf("link<%s>", object_get_typename(OBJECT(target)));
if (strcmp(target_type, type) == 0) {
*child = target;
qdev_ref(target);