[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/19] dev-uas: using error_report instead of fprint
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH 10/19] dev-uas: using error_report instead of fprintf |
Date: |
Thu, 18 Sep 2014 17:32:51 +0800 |
From: Gonglei <address@hidden>
Signed-off-by: Gonglei <address@hidden>
---
hw/usb/dev-uas.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
index 884c003..1508064 100644
--- a/hw/usb/dev-uas.c
+++ b/hw/usb/dev-uas.c
@@ -13,6 +13,7 @@
#include "qemu/option.h"
#include "qemu/config-file.h"
#include "trace.h"
+#include "qemu/error-report.h"
#include "hw/usb.h"
#include "hw/usb/desc.h"
@@ -648,7 +649,7 @@ static void usb_uas_handle_control(USBDevice *dev,
USBPacket *p,
if (ret >= 0) {
return;
}
- fprintf(stderr, "%s: unhandled control request\n", __func__);
+ error_report("%s: unhandled control request", __func__);
p->status = USB_RET_STALL;
}
@@ -814,8 +815,8 @@ static void usb_uas_handle_data(USBDevice *dev, USBPacket
*p)
usb_uas_task(uas, &iu);
break;
default:
- fprintf(stderr, "%s: unknown command iu: id 0x%x\n",
- __func__, iu.hdr.id);
+ error_report("%s: unknown command iu: id 0x%x",
+ __func__, iu.hdr.id);
p->status = USB_RET_STALL;
break;
}
@@ -861,7 +862,7 @@ static void usb_uas_handle_data(USBDevice *dev, USBPacket
*p)
p->status = USB_RET_ASYNC;
break;
} else {
- fprintf(stderr, "%s: no inflight request\n", __func__);
+ error_report("%s: no inflight request", __func__);
p->status = USB_RET_STALL;
break;
}
@@ -879,7 +880,7 @@ static void usb_uas_handle_data(USBDevice *dev, USBPacket
*p)
usb_uas_start_next_transfer(uas);
break;
default:
- fprintf(stderr, "%s: invalid endpoint %d\n", __func__, p->ep->nr);
+ error_report("%s: invalid endpoint %d", __func__, p->ep->nr);
p->status = USB_RET_STALL;
break;
}
--
1.7.12.4
- [Qemu-devel] [PATCH 06/19] usb-hub: convert init to realize, (continued)
- [Qemu-devel] [PATCH 06/19] usb-hub: convert init to realize, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 01/19] usb-storage: fix possible memory leak and missing error message, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 04/19] libusb: convert init to realize, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 08/19] dev-storage: usring error_report instead of fprintf/printf, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 12/19] dev-serial: convert init to realize, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 10/19] dev-uas: using error_report instead of fprintf,
arei.gonglei <=
- [Qemu-devel] [PATCH 18/19] usb-mtp: convert init to realize, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 19/19] usb-bus: remove "init" from USBDeviceClass struct, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 13/19] usb-ccid: convert init to realize, arei.gonglei, 2014/09/18
- [Qemu-devel] [PATCH 14/19] dev-hid: convert init to realize, arei.gonglei, 2014/09/18