diff options
author | Simon Glass | 2021-05-08 06:59:56 -0600 |
---|---|---|
committer | Tom Rini | 2021-06-08 11:39:09 -0400 |
commit | c1a2bb4f836a1c96c8e39a67be9795d462ec3356 (patch) | |
tree | df63c2604df3c23de4872d0b849b10f8c76afdd6 /include/console.h | |
parent | 24e1e8841c59956aaf0bd65720d0dbdd61aa3632 (diff) |
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>
Diffstat (limited to 'include/console.h')
-rw-r--r-- | include/console.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/console.h b/include/console.h index 7e628c0cf83..f848bcbf037 100644 --- a/include/console.h +++ b/include/console.h @@ -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); |