summaryrefslogtreecommitdiff
path: root/hw/usb/dump.h
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-03-15 17:34:06 +0100
committerPeter Wu <peter@lekensteyn.nl>2014-03-16 00:10:06 +0100
commit43d6464d410136f1c083a6df263bb71319eb2244 (patch)
treed71312c0b19da4394f8cb974d7229000616ea52f /hw/usb/dump.h
parent8002d8a662d4db7cc8c833ac960179e05f1280ed (diff)
downloadqemu-43d6464d410136f1c083a6df263bb71319eb2244.tar.gz
usbdump: fail early if dump file is not available
This allows for less less checking by the consumer and avoids unnecessary work if the capture cannot be written anyway. Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'hw/usb/dump.h')
-rw-r--r--hw/usb/dump.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/usb/dump.h b/hw/usb/dump.h
index 1478fdc44c..08134e82e3 100644
--- a/hw/usb/dump.h
+++ b/hw/usb/dump.h
@@ -59,12 +59,17 @@ typedef struct UsbDumpState UsbDumpState;
* direction, but setup_buf[0]. data is empty for PID == SETUP; for PID == IN,
* data is of length setup_len. PID == OUT is not possible because handle_ctrl
* is never called from that point.
+ *
+ * If s is NULL or if no dump file is available, no action is performed.
*/
void usb_dump_submit(UsbDumpState *s, USBPacket *p);
+
/*
* complete (ctrl): setup_is irrelevant. If PID == SETUP, then the data was just
* inserted by the "device" in handle_ctrl. Length is actual_length. If PID ==
* IN, then data is empty. PID == OUT is again not possible (see submit).
+ *
+ * If s is NULL or if no dump file is available, no action is performed.
*/
void usb_dump_complete(UsbDumpState *s, USBPacket *p);