diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2012-12-04 11:19:34 -0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2012-12-06 09:17:05 +0100 |
commit | 23e3fbec3355e67dbf26e98bbe33ef354097df8e (patch) | |
tree | 94657dacda8c9bfa31a7c5fb500880f5939c719e | |
parent | bcf7930105c26d09ae83cbd8b982d01bb421f215 (diff) | |
download | qemu-23e3fbec3355e67dbf26e98bbe33ef354097df8e.zip qemu-23e3fbec3355e67dbf26e98bbe33ef354097df8e.tar.gz qemu-23e3fbec3355e67dbf26e98bbe33ef354097df8e.tar.bz2 |
qdev: qdev_create(): use error_report() instead of hw_error()
hw_error() is specific for fatal hardware emulation errors, not for
internal errors related to the qdev object/class abstraction or object
initialization.
Replace it with an error_report() call, followed by abort().
This will also help reduce dependencies of the qdev code (as hw_error()
is from cpus.o, and depends on the CPU list from exec.o).
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
-rw-r--r-- | hw/qdev.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -109,10 +109,12 @@ DeviceState *qdev_create(BusState *bus, const char *name) dev = qdev_try_create(bus, name); if (!dev) { if (bus) { - hw_error("Unknown device '%s' for bus '%s'\n", name, - object_get_typename(OBJECT(bus))); + error_report("Unknown device '%s' for bus '%s'\n", name, + object_get_typename(OBJECT(bus))); + abort(); } else { - hw_error("Unknown device '%s' for default sysbus\n", name); + error_report("Unknown device '%s' for default sysbus\n", name); + abort(); } } |