mirror of
https://github.com/qemu/qemu.git
synced 2025-08-09 01:50:43 +00:00
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>
This commit is contained in:
parent
b89dc7e33f
commit
6b7afb7f0b
@ -13,6 +13,7 @@
|
|||||||
#include "qemu/option.h"
|
#include "qemu/option.h"
|
||||||
#include "qemu/config-file.h"
|
#include "qemu/config-file.h"
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
#include "qemu/error-report.h"
|
||||||
|
|
||||||
#include "hw/usb.h"
|
#include "hw/usb.h"
|
||||||
#include "hw/usb/desc.h"
|
#include "hw/usb/desc.h"
|
||||||
@ -648,7 +649,7 @@ static void usb_uas_handle_control(USBDevice *dev, USBPacket *p,
|
|||||||
if (ret >= 0) {
|
if (ret >= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fprintf(stderr, "%s: unhandled control request\n", __func__);
|
error_report("%s: unhandled control request", __func__);
|
||||||
p->status = USB_RET_STALL;
|
p->status = USB_RET_STALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -814,8 +815,8 @@ static void usb_uas_handle_data(USBDevice *dev, USBPacket *p)
|
|||||||
usb_uas_task(uas, &iu);
|
usb_uas_task(uas, &iu);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "%s: unknown command iu: id 0x%x\n",
|
error_report("%s: unknown command iu: id 0x%x",
|
||||||
__func__, iu.hdr.id);
|
__func__, iu.hdr.id);
|
||||||
p->status = USB_RET_STALL;
|
p->status = USB_RET_STALL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -861,7 +862,7 @@ static void usb_uas_handle_data(USBDevice *dev, USBPacket *p)
|
|||||||
p->status = USB_RET_ASYNC;
|
p->status = USB_RET_ASYNC;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "%s: no inflight request\n", __func__);
|
error_report("%s: no inflight request", __func__);
|
||||||
p->status = USB_RET_STALL;
|
p->status = USB_RET_STALL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -879,7 +880,7 @@ static void usb_uas_handle_data(USBDevice *dev, USBPacket *p)
|
|||||||
usb_uas_start_next_transfer(uas);
|
usb_uas_start_next_transfer(uas);
|
||||||
break;
|
break;
|
||||||
default:
|
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;
|
p->status = USB_RET_STALL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user