mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
console: Report an error when output buffer is exhausted
If the console output buffer is exhausted, characters are silently dropped from the end. Detect this condition and report an error when reading back the characters. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
24e1e8841c
commit
c1a2bb4f83
4 changed files with 58 additions and 16 deletions
|
@ -72,7 +72,8 @@ int console_record_reset_enable(void);
|
|||
*
|
||||
* @str: Place to put string
|
||||
* @maxlen: Maximum length of @str including nul terminator
|
||||
* @return length of string returned
|
||||
* @return length of string returned, or -ENOSPC if the console buffer was
|
||||
* overflowed by the output
|
||||
*/
|
||||
int console_record_readline(char *str, int maxlen);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue