diff options
| author | Ion Agorria <[email protected]> | 2024-01-05 09:22:08 +0200 |
|---|---|---|
| committer | Mattijs Korpershoek <[email protected]> | 2024-01-09 14:58:33 +0100 |
| commit | 9ce75f49127858d1aa36d455a869137e4d36681b (patch) | |
| tree | b5b04e4a9835ae20f7b5c07d7e34516b141ffc38 /include | |
| parent | 475aa9aabee7ab472341d755cc339f1345d5f49e (diff) | |
common: console: introduce console_record_isempty helper
Add console_record_isempty to check if console record buffer
contains any data.
Signed-off-by: Ion Agorria <[email protected]>
Signed-off-by: Svyatoslav Ryhel <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/console.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/console.h b/include/console.h index e29817e57b0..2617e160073 100644 --- a/include/console.h +++ b/include/console.h @@ -85,6 +85,13 @@ int console_record_readline(char *str, int maxlen); int console_record_avail(void); /** + * console_record_isempty() - Returns if console output is empty + * + * Return: true if empty + */ +bool console_record_isempty(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 @@ -131,6 +138,12 @@ static inline int console_in_puts(const char *str) return 0; } +static inline bool console_record_isempty(void) +{ + /* Always empty */ + return true; +} + #endif /* !CONFIG_CONSOLE_RECORD */ /** |
