[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH 1/1] qdev: rename qdev_create() argument to sync w
From: |
Dongli Zhang |
Subject: |
[Qemu-trivial] [PATCH 1/1] qdev: rename qdev_create() argument to sync with qdev_try_create() |
Date: |
Mon, 24 Dec 2018 14:35:23 +0800 |
The second argument used by qdev_create() is typename and 'name' is very
confusing. Rename it from 'name' to 'type', which is the same used by
qdev_try_create().
Signed-off-by: Dongli Zhang <address@hidden>
---
hw/core/qdev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 6b3cc55..1d65e8f 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -113,17 +113,17 @@ void qdev_set_parent_bus(DeviceState *dev, BusState *bus)
/* Create a new device. This only initializes the device state
structure and allows properties to be set. The device still needs
to be realized. See qdev-core.h. */
-DeviceState *qdev_create(BusState *bus, const char *name)
+DeviceState *qdev_create(BusState *bus, const char *type)
{
DeviceState *dev;
- dev = qdev_try_create(bus, name);
+ dev = qdev_try_create(bus, type);
if (!dev) {
if (bus) {
- error_report("Unknown device '%s' for bus '%s'", name,
+ error_report("Unknown device '%s' for bus '%s'", type,
object_get_typename(OBJECT(bus)));
} else {
- error_report("Unknown device '%s' for default sysbus", name);
+ error_report("Unknown device '%s' for default sysbus", type);
}
abort();
}
--
2.7.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-trivial] [PATCH 1/1] qdev: rename qdev_create() argument to sync with qdev_try_create(),
Dongli Zhang <=