aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-09-19 14:48:32 +0800
committerGerd Hoffmann <kraxel@redhat.com>2014-09-23 12:51:07 +0200
commit6b7afb7f0b842018781aa26a3b325429a8c91f2a (patch)
tree388a777f34756c57b35d9c592d3e3fb9be48545f /hw
parentb89dc7e33fa7ef04d9aa69ce3a9317a0acfcbc19 (diff)
downloadqemu-6b7afb7f0b842018781aa26a3b325429a8c91f2a.zip
qemu-6b7afb7f0b842018781aa26a3b325429a8c91f2a.tar.gz
qemu-6b7afb7f0b842018781aa26a3b325429a8c91f2a.tar.bz2
dev-uas: using error_report instead of fprintf
Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/usb/dev-uas.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
index a97a02f..04fc515 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;
}