qemu-e2k/hw/usb
Luiz Capitulino 56f9107e43 qdev: qdev_unplug(): use error_set()
It currently uses qerror_report(), but next commit will convert
the drive_del command to the QAPI and this requires using
error_set().

One particularity of qerror_report() is that it knows when it's
running on monitor context or command-line context and prints the
error message accordingly. error_set() doesn't do this, so we
have to be careful not to drop error messages.

qdev_unplug() has three kinds of usages:

 1. It's called when hot adding a device fails, to undo anything
    that has been done before hitting the error

 2. It's called by function monitor functions like device_del(),
    to unplug a device

 3. It's used by xen_platform.c in a way that doesn't _seem_ to
    be in monitor context

Only item 2 can print an error message to the user, this commit
maintains that.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-04-09 14:35:25 -03:00
..
bus.c
core.c usb: improve packet state sanity checks 2012-03-13 10:15:32 +01:00
desc.c
desc.h
dev-audio.c
dev-bluetooth.c
dev-hid.c
dev-hub.c
dev-network.c
dev-serial.c
dev-smartcard-reader.c
dev-storage.c qdev: qdev_unplug(): use error_set() 2012-04-09 14:35:25 -03:00
dev-wacom.c
hcd-ehci.c usb-ehci: drop unused isoch_pause variable 2012-03-13 10:15:32 +01:00
hcd-musb.c
hcd-ohci.c usb-ohci: DMA writeback bug fixes 2012-03-13 10:15:32 +01:00
hcd-uhci.c uhci: alloc can't fail, drop check. 2012-03-13 10:15:32 +01:00
hcd-xhci.c
host-bsd.c
host-linux.c
host-stub.c
libhw.c
redirect.c