[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/26] dev-storage: usring error_report instead of fp
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 10/26] dev-storage: usring error_report instead of fprintf/printf |
Date: |
Tue, 23 Sep 2014 14:13:21 +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/dev-storage.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index d97f7fd..bd7cc53 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -409,19 +409,19 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket
*p)
switch (s->mode) {
case USB_MSDM_CBW:
if (p->iov.size != 31) {
- fprintf(stderr, "usb-msd: Bad CBW size");
+ error_report("usb-msd: Bad CBW size");
goto fail;
}
usb_packet_copy(p, &cbw, 31);
if (le32_to_cpu(cbw.sig) != 0x43425355) {
- fprintf(stderr, "usb-msd: Bad signature %08x\n",
- le32_to_cpu(cbw.sig));
+ error_report("usb-msd: Bad signature %08x",
+ le32_to_cpu(cbw.sig));
goto fail;
}
DPRINTF("Command on LUN %d\n", cbw.lun);
scsi_dev = scsi_device_find(&s->bus, 0, 0, cbw.lun);
if (scsi_dev == NULL) {
- fprintf(stderr, "usb-msd: Bad LUN %d\n", cbw.lun);
+ error_report("usb-msd: Bad LUN %d", cbw.lun);
goto fail;
}
tag = le32_to_cpu(cbw.tag);
@@ -682,13 +682,13 @@ static USBDevice *usb_msd_init(USBBus *bus, const char
*filename)
pstrcpy(fmt, len, p2);
qemu_opt_set(opts, "format", fmt);
} else if (*filename != ':') {
- printf("unrecognized USB mass-storage option %s\n", filename);
+ error_report("unrecognized USB mass-storage option %s", filename);
return NULL;
}
filename = p1;
}
if (!*filename) {
- printf("block device specification needed\n");
+ error_report("block device specification needed");
return NULL;
}
qemu_opt_set(opts, "file", filename);
--
1.8.3.1
- [Qemu-devel] [PULL 04/26] usb-bus: convert USBDeviceClass init to realize, (continued)
- [Qemu-devel] [PULL 04/26] usb-bus: convert USBDeviceClass init to realize, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 17/26] dev-wacom: convert init to realize, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 08/26] usb-hub: convert init to realize, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 03/26] ohci: Convert fprint/DPRINTF/print to traces, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 01/26] usb-storage: Fix how legacy init handles option ID clash, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 26/26] usb: tag standalone ehci as hotpluggable, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 11/26] dev-uas: convert init to realize, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 02/26] usb-storage: fix possible memory leak and missing error message, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 06/26] libusb: convert init to realize, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 09/26] dev-storage: convert init to realize, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 10/26] dev-storage: usring error_report instead of fprintf/printf,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 05/26] usb-net: convert init to realize, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 24/26] usb: tag xhci as hotpluggable, Gerd Hoffmann, 2014/09/23
- [Qemu-devel] [PULL 25/26] usb: tag standalone uhci as hotpluggable, Gerd Hoffmann, 2014/09/23
- Re: [Qemu-devel] [PULL 00/26] usb patch queue, Peter Maydell, 2014/09/23