diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-04-24 23:10:04 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2001-04-24 23:10:04 +0000 |
commit | 6f43d82ecb3b8bbe6188b51acf136a260727ee81 (patch) | |
tree | 0186a9e88e8e2d1edcbeb02d40e8ed815d84f713 /cpukit/libcsupport/src/libio.c | |
parent | 2001-04-24 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-6f43d82ecb3b8bbe6188b51acf136a260727ee81.tar.bz2 |
2001-04-24 Joel Sherrill <joel@OARcorp.com>
* libc/libio.c (rtems_libio_allocate): Make sure size and offset
fields are cleared on each file open. Before this field was cleared,
this resulted in the value from the last time that IOP was used
being still in place. Discovered by Andrew Bythell
<abythell@nortelnetworks.com>.
* libc/open.c: Remove redundant setting of iop->offset.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libcsupport/src/libio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/libio.c b/cpukit/libcsupport/src/libio.c index 9c0c09776c..1216ec15a5 100644 --- a/cpukit/libcsupport/src/libio.c +++ b/cpukit/libcsupport/src/libio.c @@ -208,6 +208,8 @@ rtems_libio_t *rtems_libio_allocate( void ) rtems_libio_iop_freelist = iop->data1; iop->data1 = 0; iop->flags = LIBIO_FLAGS_OPEN; + iop->size = 0; + iop->offset = 0; goto done; } |