From: Gonglei Date: Fri, 19 Sep 2014 06:48:27 +0000 (+0800) Subject: libusb: using error_report instead of fprintf X-Git-Tag: qemu-xen-4.6.0-rc1~187^2~19 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2e6a0dd1ac45f98f02ebc8c954d9e5e36c7a47fb;p=qemu-xen.git libusb: using error_report instead of fprintf Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini Signed-off-by: Gerd Hoffmann --- diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index dfb1750130..45b74e5307 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -275,7 +275,7 @@ static void usb_host_libusb_error(const char *func, int rc) } else { errname = "?"; } - fprintf(stderr, "%s: %d [%s]\n", func, rc, errname); + error_report("%s: %d [%s]", func, rc, errname); } /* ------------------------------------------------------------------------ */ @@ -1376,14 +1376,13 @@ static int usb_host_alloc_streams(USBDevice *udev, USBEndpoint **eps, if (rc < 0) { usb_host_libusb_error("libusb_alloc_streams", rc); } else if (rc != streams) { - fprintf(stderr, - "libusb_alloc_streams: got less streams then requested %d < %d\n", - rc, streams); + error_report("libusb_alloc_streams: got less streams " + "then requested %d < %d", rc, streams); } return (rc == streams) ? 0 : -1; #else - fprintf(stderr, "libusb_alloc_streams: error not implemented\n"); + error_report("libusb_alloc_streams: error not implemented"); return -1; #endif }