提交 2e6a0dd1 编写于 作者: G Gonglei 提交者: Gerd Hoffmann

libusb: using error_report instead of fprintf

Signed-off-by: NGonglei <arei.gonglei@huawei.com>
Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 2aa76dc1
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册