1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 08:12:06 +02:00

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>
This commit is contained in:
Simon Glass
2020-07-28 19:41:11 -06:00
committed by Tom Rini
parent 33d7edfd5f
commit bd34715599
2 changed files with 42 additions and 2 deletions

View File

@@ -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)