qemu-e2k/hw/usb
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
..
bus.c hmp: Normalize HMP command handler names 2015-02-25 13:14:37 +00:00
ccid-card-emulated.c
ccid-card-passthru.c
ccid.h
combined-packet.c
core.c
desc-msos.c usb: Pair g_malloc() with g_free(), not free() 2015-02-10 09:27:20 +03:00
desc.c
desc.h
dev-audio.c usb-audio: convert init to realize 2014-09-23 12:51:07 +02:00
dev-bluetooth.c usb: Improve -usbdevice error reporting a bit 2015-02-18 10:53:10 +01:00
dev-hid.c usb-hid: Add high speed keyboard configuration 2014-10-15 13:39:22 +02:00
dev-hub.c usb-hub: convert init to realize 2014-09-23 12:51:07 +02:00
dev-mtp.c usb-mtp: convert init to realize 2014-09-23 12:51:07 +02:00
dev-network.c QemuOpts: Drop qemu_opt_set(), rename qemu_opt_set_err(), fix use 2015-02-26 14:49:31 +01:00
dev-serial.c usb: Improve -usbdevice error reporting a bit 2015-02-18 10:53:10 +01:00
dev-smartcard-reader.c usb: Convert usb-ccid to hotplug handler API 2014-10-15 05:03:14 +02:00
dev-storage.c hw: Propagate errors through qdev_prop_set_drive() 2015-03-10 11:18:23 +01:00
dev-uas.c dev-uas: using error_report instead of fprintf 2014-09-23 12:51:07 +02:00
dev-wacom.c dev-wacom: convert init to realize 2014-09-23 12:51:07 +02:00
hcd-ehci-pci.c pci: Trivial device model conversions to realize 2015-02-26 12:42:16 +01:00
hcd-ehci-sysbus.c
hcd-ehci.c vmstate: accept QEMUTimer in VMSTATE_TIMER*, add VMSTATE_TIMER_PTR* 2015-01-26 12:22:44 +01:00
hcd-ehci.h usb: tag standalone ehci as hotpluggable 2014-09-23 12:51:08 +02:00
hcd-musb.c hcd-musb: fix dereference null return value 2014-11-17 18:02:31 +01:00
hcd-ohci.c vmstate: accept QEMUTimer in VMSTATE_TIMER*, add VMSTATE_TIMER_PTR* 2015-01-26 12:22:44 +01:00
hcd-uhci.c vmstate: accept QEMUTimer in VMSTATE_TIMER*, add VMSTATE_TIMER_PTR* 2015-01-26 12:22:44 +01:00
hcd-xhci.c pci, pc, virtio fixes and cleanups 2015-03-09 09:14:28 +00:00
host-legacy.c usb: Improve -usbdevice error reporting a bit 2015-02-18 10:53:10 +01:00
host-libusb.c Clean up around error_get_pretty(), qerror_report_err() 2015-02-26 07:01:08 +00:00
host-stub.c hmp: Name HMP info handler functions hmp_info_SUBCOMMAND() 2015-02-18 11:58:50 +01:00
host.h
libhw.c
Makefile.objs Make sysbus EHCI devices ARM only by default 2015-02-18 10:53:10 +01:00
quirks-ftdi-ids.h
quirks-pl2303-ids.h
quirks.c
quirks.h
redirect.c error: Use error_report_err() where appropriate 2015-02-18 10:51:09 +01:00