summaryrefslogtreecommitdiff
path: root/cmd/fastboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/fastboot.c')
-rw-r--r--cmd/fastboot.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd/fastboot.c b/cmd/fastboot.c
index e71f873527b..f3929f88dfa 100644
--- a/cmd/fastboot.c
+++ b/cmd/fastboot.c
@@ -103,8 +103,15 @@ static int do_fastboot_usb(int argc, char *const argv[],
while (1) {
if (g_dnl_detach())
break;
- if (ctrlc())
+ if (IS_ENABLED(CONFIG_CMD_FASTBOOT_ABORT_KEYED)) {
+ if (tstc()) {
+ getchar();
+ puts("\rOperation aborted.\n");
+ break;
+ }
+ } else if (ctrlc()) {
break;
+ }
schedule();
dm_usb_gadget_handle_interrupts(udc);
}