[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/19] libusb: using error_report instead of fpr
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 05/19] libusb: using error_report instead of fprintf |
Date: |
Thu, 18 Sep 2014 12:12:38 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
Il 18/09/2014 11:32, address@hidden ha scritto:
> From: Gonglei <address@hidden>
>
> Signed-off-by: Gonglei <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 863be64..0650910 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
> }
>
Reviewed-by: Paolo Bonzini <address@hidden>
- [Qemu-devel] [PATCH 14/19] dev-hid: convert init to realize, (continued)
- [Qemu-devel] [PATCH 14/19] dev-hid: convert init to realize, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 16/19] usb-audio: convert init to realize, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 15/19] dev-wacom: convert init to realize, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 09/19] dev-uas: convert init to realize, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 05/19] libusb: using error_report instead of fprintf, arei.gonglei, 2014/09/18
- Re: [Qemu-devel] [PATCH 05/19] libusb: using error_report instead of fprintf,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 11/19] dev-bluetooth: convert init to realize, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 17/19] usb-redir: convert init to realize, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 07/19] dev-storage: convert init to realize, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 03/19] usb-net: convert init to realize, arei.gonglei, 2014/09/18