summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-05-27 21:23:08 +0200
committerKevin Wolf <kwolf@redhat.com>2010-07-06 17:05:49 +0200
commitbd6c9a617d969752c9d3663f6ad29ae6d6d6c402 (patch)
treed35ef0356a1e885d332ef7e5b120dec7b6b77379 /hw
parentb47b35250fbfa062aedf6ab6e5faab84c4a76f4f (diff)
downloadqemu-bd6c9a617d969752c9d3663f6ad29ae6d6d6c402.tar.gz
qemu-bd6c9a617d969752c9d3663f6ad29ae6d6d6c402.tar.bz2
qemu-bd6c9a617d969752c9d3663f6ad29ae6d6d6c402.zip
qdev: Don't hw_error() in qdev_init_nofail()
Some of the failures are internal errors, and hw_error() is okay then. But the common way to fail is bad user input, e.g. -global isa-fdc.driveA=foo where drive foo has an unsupported rerror value. exit(1) instead. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/qdev.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index 61f999c023..00ceada615 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -326,8 +326,10 @@ void qdev_init_nofail(DeviceState *dev)
{
DeviceInfo *info = dev->info;
- if (qdev_init(dev) < 0)
- hw_error("Initialization of device %s failed\n", info->name);
+ if (qdev_init(dev) < 0) {
+ error_report("Initialization of device %s failed\n", info->name);
+ exit(1);
+ }
}
/* Unlink device from bus and free the structure. */