aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@mailbox.org>2023-02-27 20:55:39 +0100
committerSimon Glass <sjg@chromium.org>2023-03-14 16:08:51 -0600
commit97d6d7e3606a352843bae6547e972fbaca3ccf7b (patch)
treeea636f7afdfc6cc977042c47d13bf980b03f7063 /common
parenta96dea25694de42ca596c333f650f8636de09ed9 (diff)
downloadu-boot-97d6d7e3606a352843bae6547e972fbaca3ccf7b.zip
u-boot-97d6d7e3606a352843bae6547e972fbaca3ccf7b.tar.gz
u-boot-97d6d7e3606a352843bae6547e972fbaca3ccf7b.tar.bz2
console: Use only 0x00 as line separator for console recording
In case character 0x20 (space) is used as line separator, character 0x9 (tab) is treated end of line. Commands which output a lot of tabs, i.e. various tree printing commands like 'fdt print' then end up generating a lot of newlines in the recorded output, and the recorded output is corrupted. Use character 0x00 (NUL) as separator instead to treat the tabs as valid part of recorded line. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/console.c b/common/console.c
index e4301a4..71ad8ef 100644
--- a/common/console.c
+++ b/common/console.c
@@ -842,7 +842,7 @@ int console_record_readline(char *str, int maxlen)
return -ENOSPC;
return membuff_readline((struct membuff *)&gd->console_out, str,
- maxlen, ' ');
+ maxlen, '\0');
}
int console_record_avail(void)