qdev: show name of device that fails init
When initialising a device fails, show the name of the failing device. The current behaviour is to silently exit on such errors. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
fa0cfdf24a
commit
c8cd1fcd66
1 changed files with 1 additions and 0 deletions
|
|
@ -215,6 +215,7 @@ DeviceState *qdev_device_add(QemuOpts *opts)
|
|||
return NULL;
|
||||
}
|
||||
if (qdev_init(qdev) != 0) {
|
||||
qemu_error("Error initializing device %s\n", driver);
|
||||
qdev_free(qdev);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue