From f4bbaaf584ed8d0a430b467bace15f338cba4c57 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 17 Feb 2015 14:28:02 +0100 Subject: usb: Propagate errors through usb_register_companion() This loses the messages explaining the error printed with error_printf_unless_qmp(). The next commit will make up for the loss. Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann --- include/hw/usb.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/hw/usb.h b/include/hw/usb.h index e6dfb87..5be2937 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -526,8 +526,9 @@ struct USBBus { }; struct USBBusOps { - int (*register_companion)(USBBus *bus, USBPort *ports[], - uint32_t portcount, uint32_t firstport); + void (*register_companion)(USBBus *bus, USBPort *ports[], + uint32_t portcount, uint32_t firstport, + Error **errp); void (*wakeup_endpoint)(USBBus *bus, USBEndpoint *ep, unsigned int stream); }; @@ -543,9 +544,10 @@ USBDevice *usb_create_simple(USBBus *bus, const char *name); USBDevice *usbdevice_create(const char *cmdline); void usb_register_port(USBBus *bus, USBPort *port, void *opaque, int index, USBPortOps *ops, int speedmask); -int usb_register_companion(const char *masterbus, USBPort *ports[], - uint32_t portcount, uint32_t firstport, - void *opaque, USBPortOps *ops, int speedmask); +void usb_register_companion(const char *masterbus, USBPort *ports[], + uint32_t portcount, uint32_t firstport, + void *opaque, USBPortOps *ops, int speedmask, + Error **errp); void usb_port_location(USBPort *downstream, USBPort *upstream, int portnr); void usb_unregister_port(USBBus *bus, USBPort *port); void usb_claim_port(USBDevice *dev, Error **errp); -- cgit v1.1