[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/26] libusb: using error_report instead of fprintf
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 07/26] libusb: using error_report instead of fprintf |
Date: |
Tue, 23 Sep 2014 14:13:18 +0200 |
From: Gonglei <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/host-libusb.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index dfb1750..45b74e5 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
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/26] usb patch queue, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 07/26] libusb: using error_report instead of fprintf,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 12/26] dev-uas: using error_report instead of fprintf, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 23/26] usb-serial: only check speed once at realize time, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 19/26] usb-redir: convert init to realize, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 21/26] usb-bus: remove "init" from USBDeviceClass struct, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 22/26] usb-bus: introduce a wrapper function to check speed, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 18/26] usb-audio: convert init to realize, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 13/26] dev-bluetooth: convert init to realize, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 15/26] usb-ccid: convert init to realize, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 14/26] dev-serial: convert init to realize, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 16/26] dev-hid: convert init to realize, Gerd Hoffmann, 2014/09/23