Changes in uspace/lib/c/generic/io/io.c [2f72c67a:76d6169] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/io.c
r2f72c67a r76d6169 45 45 #include <vfs/vfs.h> 46 46 #include <vfs/vfs_sess.h> 47 #include <ipc/ loc.h>47 #include <ipc/devmap.h> 48 48 #include <adt/list.h> 49 49 #include "../private/io.h" … … 418 418 419 419 bytes_used = stream->buf_head - stream->buf_tail; 420 if (bytes_used == 0) 421 return; 420 422 421 423 /* If buffer has prefetched read data, we need to seek back. */ 422 if ( bytes_used > 0 &&stream->buf_state == _bs_read)424 if (stream->buf_state == _bs_read) 423 425 lseek(stream->fd, - (ssize_t) bytes_used, SEEK_CUR); 424 426 425 427 /* If buffer has unwritten data, we need to write them out. */ 426 if ( bytes_used > 0 &&stream->buf_state == _bs_write)428 if (stream->buf_state == _bs_write) 427 429 (void) _fwrite(stream->buf_tail, 1, bytes_used, stream); 428 430
Note:
See TracChangeset
for help on using the changeset viewer.