[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/10] usb: mtp: replace debug printfs with trace poi
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 02/10] usb: mtp: replace debug printfs with trace points |
Date: |
Mon, 5 May 2014 13:12:31 +0200 |
Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Peter Wu <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
---
hw/usb/dev-mtp.c | 8 ++++----
trace-events | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 8b44032..17df447 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -294,7 +294,7 @@ static MTPObject *usb_mtp_object_alloc(MTPState *s,
uint32_t handle,
goto ignore;
}
- fprintf(stderr, "%s: 0x%x %s\n", __func__, o->handle, o->path);
+ trace_usb_mtp_object_alloc(s->dev.addr, o->handle, o->path);
QTAILQ_INSERT_TAIL(&s->objects, o, next);
return o;
@@ -310,7 +310,7 @@ static void usb_mtp_object_free(MTPState *s, MTPObject *o)
{
int i;
- fprintf(stderr, "%s: 0x%x %s\n", __func__, o->handle, o->path);
+ trace_usb_mtp_object_free(s->dev.addr, o->handle, o->path);
QTAILQ_REMOVE(&s->objects, o, next);
for (i = 0; i < o->nchildren; i++) {
@@ -843,8 +843,7 @@ static void usb_mtp_command(MTPState *s, MTPControl *c)
res0 = data_in->length;
break;
default:
- fprintf(stderr, "%s: unknown command code 0x%04x\n",
- __func__, c->code);
+ trace_usb_mtp_op_unknown(s->dev.addr, c->code);
usb_mtp_queue_result(s, RES_OPERATION_NOT_SUPPORTED,
c->trans, 0, 0, 0);
return;
@@ -892,6 +891,7 @@ static void usb_mtp_handle_control(USBDevice *dev,
USBPacket *p,
static void usb_mtp_cancel_packet(USBDevice *dev, USBPacket *p)
{
+ /* we don't use async packets, so this should never be called */
fprintf(stderr, "%s\n", __func__);
}
diff --git a/trace-events b/trace-events
index a5218ba..af4449d 100644
--- a/trace-events
+++ b/trace-events
@@ -453,6 +453,9 @@ usb_mtp_op_get_object_handles(int dev, uint32_t handle,
const char *path) "dev %
usb_mtp_op_get_object_info(int dev, uint32_t handle, const char *path) "dev
%d, handle 0x%x, path %s"
usb_mtp_op_get_object(int dev, uint32_t handle, const char *path) "dev %d,
handle 0x%x, path %s"
usb_mtp_op_get_partial_object(int dev, uint32_t handle, const char *path,
uint32_t offset, uint32_t length) "dev %d, handle 0x%x, path %s, off %d, len %d"
+usb_mtp_op_unknown(int dev, uint32_t code) "dev %d, command code 0x%x"
+usb_mtp_object_alloc(int dev, uint32_t handle, const char *path) "dev %d,
handle 0x%x, path %s"
+usb_mtp_object_free(int dev, uint32_t handle, const char *path) "dev %d,
handle 0x%x, path %s"
# hw/usb/host-libusb.c
usb_host_open_started(int bus, int addr) "dev %d:%d"
--
1.8.3.1
- [Qemu-devel] [PULL 00/10] usb patch queue, Gerd Hoffmann, 2014/05/05
- [Qemu-devel] [PULL 02/10] usb: mtp: replace debug printfs with trace points,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 06/10] usb: mtp: fix error path memory leak, Gerd Hoffmann, 2014/05/05
- [Qemu-devel] [PULL 01/10] usb-ohci: Add vmstate descriptor, Gerd Hoffmann, 2014/05/05
- [Qemu-devel] [PULL 03/10] usb: mtp: fix usb_mtp_add_u64, Gerd Hoffmann, 2014/05/05
- [Qemu-devel] [PULL 07/10] usb: mtp: avoid empty description string, Gerd Hoffmann, 2014/05/05
- [Qemu-devel] [PULL 09/10] usb: mtp: fix possible buffer overflow, Gerd Hoffmann, 2014/05/05
- [Qemu-devel] [PULL 08/10] usb: mtp: drop data-out hexdump, Gerd Hoffmann, 2014/05/05
- [Qemu-devel] [PULL 04/10] usb: mtp: fix version (is decimal not bcd), Gerd Hoffmann, 2014/05/05
- [Qemu-devel] [PULL 10/10] usb: mtp: reply INCOMPLETE_TRANSFER on read errors, Gerd Hoffmann, 2014/05/05
- [Qemu-devel] [PULL 05/10] usb: mtp: fix serial (must be exact 32 chars), Gerd Hoffmann, 2014/05/05
- Re: [Qemu-devel] [PULL 00/10] usb patch queue, Peter Maydell, 2014/05/07