u-boot/common
Yurii Monakov 2dd86b9075 cli: Consume invalid escape sequences early
Unexpected 'Esc' key presses are accumulated internally, even if it is
already clear that the current escape sequence is invalid. This results
in weird behaviour. For example, the next character after 'Esc' key
simply disappears from input and 'Unknown command' is printed
after 'Enter'.

This commit fixes some issues with extra 'Esc' keys entered by user:

1. Sequence <Esc><Esc><Enter> right after autoboot stop gives:
=>
nknown command 'ry 'help'
=>
2. Sequence <Esc><p><r><i><Enter> gives:
=> ri
Unknown command 'ri' - try 'help'
=>
3. Extra 'Esc' key presses break backspace functionality.

Signed-off-by: Yurii Monakov <monakov.y@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-24 16:34:45 -04:00
..
eeprom
init spl: Use SYS_MALLOC_F instead of SYS_MALLOC_F_LEN 2023-10-06 14:38:12 -04:00
spl u-boot-imx-20231024 2023-10-24 09:39:02 -04:00
autoboot.c autoboot: Rework CONFIG_AUTOBOOT_STOP_STR_* usage 2023-01-20 12:27:06 -05:00
avb_verify.c common: avb_verify: prevent opening incorrect session 2023-02-17 10:51:28 -05:00
bloblist.c bloblist: Add missing name 2023-10-06 14:38:13 -04:00
board_f.c bloblist: Support initing from multiple places 2023-10-06 14:38:13 -04:00
board_info.c
board_r.c event: add new EVT_SETTINGS_R event 2023-10-23 17:07:06 +03:00
bootstage.c spl: Remove #ifdefs with BOOTSTAGE 2023-10-06 14:38:12 -04:00
bouncebuf.c common: bouncebuf: Add missing cast to dma_addr_t 2023-08-22 15:17:52 -04:00
cli_getch.c cli: Consume invalid escape sequences early 2023-10-24 16:34:45 -04:00
cli_hush.c common: hush: Remove unused NEEDS_MANUAL_RELOC code bits 2023-09-14 10:42:24 -04:00
cli_readline.c cli: Add a function to set up a new cread 2023-10-11 15:43:54 -04:00
cli_simple.c
cli.c cli: run_commandf(): small fixups 2023-03-30 15:09:59 -04:00
command.c global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
console.c console: Print out complete stdio device list 2023-08-02 16:32:31 +08:00
cros_ec.c
cyclic.c cyclic: get rid of cyclic_init() 2022-11-02 08:42:03 +01:00
ddr_spd.c
dfu.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
dlmalloc.c malloc: Enable assertions if UNIT_TEST is enabled 2023-10-11 13:22:29 -04:00
dlmalloc.src
edid.c
event.c event: add new EVT_SETTINGS_R event 2023-10-23 17:07:06 +03:00
exports.c
flash.c
hash.c common: hash: Remove unused NEEDS_MANUAL_RELOC code bits 2023-09-14 10:42:24 -04:00
hwconfig.c
iomux.c
iotrace.c
kallsyms.c
Kconfig event: Rename rest of EVENT_SPY to EVENT_SPY_FULL or EVENT_SPY* 2023-10-11 13:22:32 -04:00
kgdb_stubs.c
kgdb.c
log_console.c log: Support outputing function names in SPL 2023-07-17 17:23:15 +08:00
log_syslog.c
log.c log: Tidy up an ambiguous comment 2023-07-17 17:12:07 +08:00
main.c binman: add sign option for binman 2023-03-14 16:08:51 -06:00
Makefile spl: Use SYS_MALLOC_F instead of SYS_MALLOC_F_LEN 2023-10-06 14:38:12 -04:00
malloc_simple.c
memsize.c common/memsize.c: Fix get_ram_size() when cache is enabled 2023-06-21 16:54:25 -04:00
menu.c menu: Re-enable the ANSI codes 2023-06-23 14:38:16 -04:00
miiphyutil.c
qfw.c qemu: Move qfw kernel setup into a common file 2023-02-06 13:04:53 -05:00
s_record.c
scp03.c
splash_source.c common: splash_source: Fix type casting errors 2023-07-21 13:13:43 -04:00
splash.c common: Replace #ifdef and #if with if's 2023-04-24 21:37:45 +02:00
stackprot.c
stdio.c stdio: fix stdio_deregister_dev() 2023-10-09 15:24:31 -04:00
system_map.c
update.c common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
usb_hub.c usb: Drop unused ehci-faraday driver 2023-02-07 14:33:50 -05:00
usb_kbd.c
usb_onboard_hub.c usb: onboard-hub: add driver to manage onboard hub supplies 2023-01-12 16:19:53 +01:00
usb_storage.c blk: Use a macro for the typical block size 2023-10-10 16:19:29 -04:00
usb.c usb: Tidy up the usb_start flag 2023-05-13 09:52:32 -04:00
xyzModem.c