fastboot: add some debug logging
Add logging for fastboot commands for debugging misbehaviour.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c
index 4e9d9b7..cd4ef72 100644
--- a/drivers/fastboot/fb_common.c
+++ b/drivers/fastboot/fb_common.c
@@ -51,6 +51,7 @@
FASTBOOT_RESPONSE_LEN - strlen(response) - 1,
format, args);
va_end(args);
+ debug("## FASTBOOT: %s\n", response);
}
}
@@ -73,10 +74,11 @@
*/
void fastboot_okay(const char *reason, char *response)
{
- if (reason)
+ if (reason) {
fastboot_response("OKAY", response, "%s", reason);
- else
+ } else {
fastboot_response("OKAY", response, NULL);
+ }
}
/**
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 741775a..7fca24a 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -518,6 +518,7 @@
if (req->actual < req->length) {
cmdbuf[req->actual] = '\0';
+ debug("## FASTBOOT: %s\n", cmdbuf);
cmd = fastboot_handle_command(cmdbuf, response);
} else {
pr_err("buffer overflow");