mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 00:32:04 +02:00
sandbox: Restore blocking I/O on exit
At present sandbox sets non-blocking I/O as soon as any input is read from the terminal. However it does not restore the previous state on exit. Fix this and drop the old os_read_no_block() function. This means that we always enable blocking I/O in sandbox (if input is a terminal) whereas previously it would only happen on the first call to tstc() or getc(). However, the difference is likely not important. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
10
include/os.h
10
include/os.h
@@ -26,16 +26,6 @@ struct sandbox_state;
|
||||
*/
|
||||
ssize_t os_read(int fd, void *buf, size_t count);
|
||||
|
||||
/**
|
||||
* Access to the OS read() system call with non-blocking access
|
||||
*
|
||||
* \param fd File descriptor as returned by os_open()
|
||||
* \param buf Buffer to place data
|
||||
* \param count Number of bytes to read
|
||||
* \return number of bytes read, or -1 on error
|
||||
*/
|
||||
ssize_t os_read_no_block(int fd, void *buf, size_t count);
|
||||
|
||||
/**
|
||||
* Access to the OS write() system call
|
||||
*
|
||||
|
Reference in New Issue
Block a user