Set the read/write offset to 0 when the file is opened. The ACVC had a test

that performed the sequence open/write/close/open/read/close on a file.
It did not get the correct result since the file descriptor was reused.
This commit is contained in:
Joel Sherrill
1999-02-10 17:05:55 +00:00
parent efb1b830bb
commit 9619ff36e9
3 changed files with 3 additions and 0 deletions

View File

@@ -143,6 +143,7 @@ int open(
* returned by successful path evaluation.
*/
iop->offset = 0;
iop->handlers = temp_loc.handlers;
iop->file_info = temp_loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );

View File

@@ -143,6 +143,7 @@ int open(
* returned by successful path evaluation.
*/
iop->offset = 0;
iop->handlers = temp_loc.handlers;
iop->file_info = temp_loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );

View File

@@ -143,6 +143,7 @@ int open(
* returned by successful path evaluation.
*/
iop->offset = 0;
iop->handlers = temp_loc.handlers;
iop->file_info = temp_loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );