diff options
author | Simon Glass <sjg@chromium.org> | 2022-03-27 14:26:14 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-04-18 17:53:56 -0400 |
commit | 830d73b4de41a3bfd20bf0bfdfe0189214340ed4 (patch) | |
tree | 67bcaf8000fa76315fc8402ddad734916da910ca /arch | |
parent | 9859465bfe838bc8264d45e1a1bed847bba74bad (diff) | |
download | u-boot-830d73b4de41a3bfd20bf0bfdfe0189214340ed4.zip u-boot-830d73b4de41a3bfd20bf0bfdfe0189214340ed4.tar.gz u-boot-830d73b4de41a3bfd20bf0bfdfe0189214340ed4.tar.bz2 |
sandbox: Correct loss of early output in SPL
At present fputc() is used before the console is available, then write()
is used. These are not compatible. Since fputc() buffers internally it is
better to use the write(), so that a partial line is immediately
displayed.
This has a slight effect on performance, but we are already using write()
for the vast majority of the output with no obvious impacts.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sandbox/cpu/os.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c index d83c862..5ea5417 100644 --- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c @@ -644,7 +644,7 @@ int os_get_filesize(const char *fname, long long *size) void os_putc(int ch) { - fputc(ch, stdout); + os_write(1, &ch, 1); } void os_puts(const char *str) |