diff options
| author | Steffen Jaeckel <[email protected]> | 2021-07-08 15:57:40 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-07-23 13:36:20 -0400 |
| commit | 25c8b9f298e46ea6048b5308f7ee207c6461c36a (patch) | |
| tree | 1c8f414dc7ae2d0e914a706e3dd8aaebb945c946 /include/console.h | |
| parent | 33198740aca2d68e9760cfd6ebb5a55894431966 (diff) | |
test: add first autoboot unit tests
This adds tests for the crypt-based and plain SHA256-based password hashing
algorithms in the autoboot flow.
Signed-off-by: Steffen Jaeckel <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'include/console.h')
| -rw-r--r-- | include/console.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h index f848bcbf037..b182440fcd6 100644 --- a/include/console.h +++ b/include/console.h @@ -83,6 +83,17 @@ int console_record_readline(char *str, int maxlen); * @return available bytes (0 if empty) */ int console_record_avail(void); + +/** + * console_in_puts() - Write a string to the console input buffer + * + * This writes the given string to the console_in buffer which will then be + * returned if a function calls e.g. `getc()` + * + * @str: the string to write + * @return the number of bytes added + */ +int console_in_puts(const char *str); #else static inline int console_record_init(void) { @@ -114,6 +125,12 @@ static inline int console_record_avail(void) return 0; } +static inline int console_in_puts(const char *str) +{ + /* There is never anything written */ + return 0; +} + #endif /* !CONFIG_CONSOLE_RECORD */ /** |
