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>
void os_putc(int ch)
{
- fputc(ch, stdout);
+ os_write(1, &ch, 1);
}
void os_puts(const char *str)