Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stdio/file: fix multiple issues in file stream functions
Fixed the following issues: - fclose returned -EINVAL instead of EOF - fclose did not return EOF on stream buffer flushing errors - removed unnecessary stream buffer flushing in fopen & fdopen - freopen did not return NULL on stream buffer flushing errors - fseek/fseeko/fsetpos cleared F_EOF flag on error - ftell/ftello/fgetpos cleared F_EOF flag - ftell/ftello/fgetpos flushed the stream buffer - non-blocking fflush was unsupported - flushing failed for non-seekable streams (lseek returning ESPIPE) - interleaved fread/fwrite failed for non-seekable streams (lseek returning ESPIPE) - non-blocking fread was unsupported - unbuffered fread did not set F_ERROR flag on read errors - unbuffered fread did not set F_EOF flag at end-of-file - buffered fread did not set F_ERROR flag on write buffer flushing errors - buffered fread did not return 0 on write buffer flushing errors - buffered fread did not set F_ERROR flag on buffer refilling errors - buffered fread incorrectly set F_EOF flag on EAGAIN errors - buffered fread did not always read full blocks from files - non-blocking fwrite was unsupported - unbuffered fwrite did not set F_ERROR flag on write errors - buffered fwrite did not set F_ERROR flag on read buffer flushing errors - buffered fwrite did not return 0 on read buffer flushing errors - buffered fwrite did not always write full blocks to files JIRA: RTOS-892
- Loading branch information