diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-28 19:41:11 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-07 22:31:32 -0400 |
commit | bd34715599c17e0d3f09af1cdfba8af120bc8602 (patch) | |
tree | b802a44b042f1b072295c1b3651fae6a175c9433 /common | |
parent | 33d7edfd5f69b9847bd7affc5481338ec8d7ee39 (diff) |
console: Always define the console-recording functions
On boards without console recording these function are currently missing.
It is more convenient for them to be present but to return dummy values.
That way if we know that a test needs recording, we can check if it is
available, and skip the test if not, while avoiding #ifdefs.
Update the header file according and adjust console_record_reset_enable()
to return an error if recording is not available.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/console.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/console.c b/common/console.c index 07c483f820..8e50af1f9d 100644 --- a/common/console.c +++ b/common/console.c @@ -635,10 +635,12 @@ void console_record_reset(void) membuff_purge((struct membuff *)&gd->console_in); } -void console_record_reset_enable(void) +int console_record_reset_enable(void) { console_record_reset(); gd->flags |= GD_FLG_RECORD; + + return 0; } int console_record_readline(char *str, int maxlen) |