qemu-e2k/include
Markus Armbruster 9b3d111ad9 hw: Propagate errors through qdev_prop_set_drive()
Three kinds of callers:

1. On failure, report the error and abort

   Passing &error_abort does the job.  No functional change.

2. On failure, report the error and exit()

   This is qdev_prop_set_drive_nofail().  Error reporting moves from
   qdev_prop_set_drive() to its caller.  Because hiding away the error
   in the monitor right before exit() isn't helpful, replace
   qerror_report_err() by error_report_err().  Shouldn't make a
   difference, because qdev_prop_set_drive_nofail() should never be
   used in QMP context.

3. On failure, report the error and recover

   This is usb_msd_init() and scsi_bus_legacy_add_drive().  Error
   reporting and freeing the error object moves from
   qdev_prop_set_drive() to its callers.

   Because usb_msd_init() can't run in QMP context, replace
   qerror_report_err() by error_report_err() there.

   No functional change.

   scsi_bus_legacy_add_drive() calling qerror_report_err() is of
   course inappropriate, but this commit merely makes it more obvious.
   The next one will clean it up.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-Id: <1425925048-15482-3-git-send-email-armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-10 11:18:23 +01:00
..
block block: Forbid bdrv_set_aio_context outside BQL 2015-02-27 14:43:45 +01:00
disas
exec pc-dimm: add a function to calculate VM's current RAM size 2015-03-04 13:00:04 -05:00
fpu
hw hw: Propagate errors through qdev_prop_set_drive() 2015-03-10 11:18:23 +01:00
libdecnumber
migration Add more VMSTATE_*_TEST variants for integers 2015-03-09 14:59:56 +01:00
monitor Clean up around error_get_pretty(), qerror_report_err() 2015-02-26 07:01:08 +00:00
net virtio-net,tap: use standard-headers 2015-02-26 13:04:04 +01:00
qapi
qemu qemu-img: Suppress unhelpful extra errors in convert, amend 2015-02-26 14:51:21 +01:00
qom Generalize QOM publishing of date and time from mc146818rtc.c 2015-03-09 14:59:55 +01:00
standard-headers virtio_ring.h: s/__inline__/inline/ 2015-02-26 13:04:09 +01:00
sysemu pci, pc, virtio fixes and cleanups 2015-03-09 09:14:28 +00:00
ui hmp: Normalize HMP command handler names 2015-02-25 13:14:37 +00:00
config.h
elf.h
glib-compat.h
qemu-common.h qxl: refactor rounding up to a nearest power of 2 2015-03-03 08:33:08 +01:00
qemu-io.h
qjson.h
trace-tcg.h
trace.h