diff options
author | Tom Rini <trini@konsulko.com> | 2024-01-11 10:03:51 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-01-11 10:03:51 -0500 |
commit | d3dba8a28bb7f57a4558c944f9c329c467144633 (patch) | |
tree | 517ec69555b6f0f1dafd0f114ec67c7b9ddbcdf0 /common/console.c | |
parent | 7a59d520ef0bfd29b339cba5282149271d5ac3b2 (diff) | |
parent | 6c2f753f4ad3dcee60190949d1286736a6d51d17 (diff) |
Merge tag 'u-boot-dfu-20240111' of https://source.denx.de/u-boot/custodians/u-boot-dfu
u-boot-dfu-20240111
- Implement fastboot multi-response. This allows multi-line response and
most importantly, finally adds support for fastboot getvar all command.
- New 'fastboot oem console' command. Useful for debugging to send data
the u-boot shell via fastboot
- Console recording fixes
Diffstat (limited to 'common/console.c')
-rw-r--r-- | common/console.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/common/console.c b/common/console.c index 1ffda49c87e..cad65891fc9 100644 --- a/common/console.c +++ b/common/console.c @@ -821,6 +821,9 @@ int console_record_init(void) ret = membuff_new((struct membuff *)&gd->console_in, CONFIG_CONSOLE_RECORD_IN_SIZE); + /* Start recording from the beginning */ + gd->flags |= GD_FLG_RECORD; + return ret; } @@ -845,7 +848,7 @@ int console_record_readline(char *str, int maxlen) return -ENOSPC; return membuff_readline((struct membuff *)&gd->console_out, str, - maxlen, '\0'); + maxlen, '\0', false); } int console_record_avail(void) @@ -853,6 +856,11 @@ int console_record_avail(void) return membuff_avail((struct membuff *)&gd->console_out); } +bool console_record_isempty(void) +{ + return membuff_isempty((struct membuff *)&gd->console_out); +} + int console_in_puts(const char *str) { return membuff_put((struct membuff *)&gd->console_in, str, strlen(str)); |