mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
bcf7930105
commit
23e3fbec33
1 changed files with 5 additions and 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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue