sandbox: Add function os_flush()
It flushes stdout. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -669,6 +669,11 @@ void os_puts(const char *str)
|
|||||||
os_putc(*str++);
|
os_putc(*str++);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void os_flush(void)
|
||||||
|
{
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
|
|
||||||
int os_write_ram_buf(const char *fname)
|
int os_write_ram_buf(const char *fname)
|
||||||
{
|
{
|
||||||
struct sandbox_state *state = state_get_current();
|
struct sandbox_state *state = state_get_current();
|
||||||
|
@@ -295,6 +295,14 @@ void os_putc(int ch);
|
|||||||
*/
|
*/
|
||||||
void os_puts(const char *str);
|
void os_puts(const char *str);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* os_flush() - flush controlling OS terminal
|
||||||
|
*
|
||||||
|
* This bypasses the U-Boot console support and flushes directly the OS
|
||||||
|
* stdout file descriptor.
|
||||||
|
*/
|
||||||
|
void os_flush(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* os_write_ram_buf() - write the sandbox RAM buffer to a existing file
|
* os_write_ram_buf() - write the sandbox RAM buffer to a existing file
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user