Commit c8cd1fcd authored by Amit Shah's avatar Amit Shah Committed by Anthony Liguori
Browse files

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: default avatarAmit Shah <amit.shah@redhat.com>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent fa0cfdf2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
    }