[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/17] qdev: Don't hw_error() in qdev_init_nofail()
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 08/17] qdev: Don't hw_error() in qdev_init_nofail() |
Date: |
Tue, 6 Jul 2010 17:33:17 +0200 |
From: Markus Armbruster <address@hidden>
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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
hw/qdev.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/qdev.c b/hw/qdev.c
index 61f999c..00ceada 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. */
--
1.6.6.1
- [Qemu-devel] [PULL 00/17] Block patches, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 01/17] qemu-img check: Distinguish different kinds of errors, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 03/17] Add virtio disk identification support, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 04/17] blockdev: Clean up how readonly persists across virtual media change, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 02/17] qcow2/vdi: Change check to distinguish error cases, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 05/17] block migration: Fix test for read-only drive, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 06/17] raw-posix: Fix test for host CD-ROM, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 07/17] fdc: Reject unimplemented error actions, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 09/17] scsi: Reject unimplemented error actions, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 08/17] qdev: Don't hw_error() in qdev_init_nofail(),
Kevin Wolf <=
- [Qemu-devel] [PATCH 10/17] error: New qemu_opts_loc_restore(), Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 12/17] ide: Improve error messages, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 11/17] scsi: Error locations for -drive if=scsi device initialization, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 13/17] ide: Replace IDEState members is_cdrom, is_cf by drive_kind, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 14/17] ide: Make ide_init_drive() return success, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 15/17] ide: Reject readonly drives unless CD-ROM, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 16/17] ide: Reject invalid CHS geometry, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 17/17] block: add sheepdog driver for distributed storage support, Kevin Wolf, 2010/07/06
- Re: [Qemu-devel] [PULL 00/17] Block patches, Anthony Liguori, 2010/07/06