Changeset 6f43d82 in rtems


Ignore:
Timestamp:
Apr 24, 2001, 11:10:04 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
64c5edc1
Parents:
eb22ebe
Message:

2001-04-24 Joel Sherrill <joel@…>

  • 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@…>.

  • libc/open.c: Remove redundant setting of iop->offset.
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/libio.c

    reb22ebe r6f43d82  
    209209    iop->data1 = 0;
    210210    iop->flags = LIBIO_FLAGS_OPEN;
     211    iop->size = 0;
     212    iop->offset = 0;
    211213    goto done;
    212214  }
  • c/src/exec/libcsupport/src/open.c

    reb22ebe r6f43d82  
    147147   */
    148148
    149   iop->offset     = 0;
    150149  iop->handlers   = loc.handlers;
    151150  iop->file_info  = loc.node_access;
  • c/src/lib/ChangeLog

    reb22ebe r6f43d82  
     12001-04-24      Joel Sherrill <joel@OARcorp.com>
     2
     3        * libc/libio.c (rtems_libio_allocate): Make sure size and offset
     4        fields are cleared on each file open.  Before this field was cleared,
     5        this resulted in the value from the last time that IOP was used
     6        being still in place.  Discovered by  Andrew Bythell
     7        <abythell@nortelnetworks.com>.
     8        * libc/open.c: Remove redundant setting of iop->offset.
     9
    1102001-04-20  Correo Fernando-ruiz <correo@fernando-ruiz.com>
    211
  • c/src/lib/libc/libio.c

    reb22ebe r6f43d82  
    209209    iop->data1 = 0;
    210210    iop->flags = LIBIO_FLAGS_OPEN;
     211    iop->size = 0;
     212    iop->offset = 0;
    211213    goto done;
    212214  }
  • c/src/lib/libc/open.c

    reb22ebe r6f43d82  
    147147   */
    148148
    149   iop->offset     = 0;
    150149  iop->handlers   = loc.handlers;
    151150  iop->file_info  = loc.node_access;
  • cpukit/libcsupport/src/libio.c

    reb22ebe r6f43d82  
    209209    iop->data1 = 0;
    210210    iop->flags = LIBIO_FLAGS_OPEN;
     211    iop->size = 0;
     212    iop->offset = 0;
    211213    goto done;
    212214  }
  • cpukit/libcsupport/src/open.c

    reb22ebe r6f43d82  
    147147   */
    148148
    149   iop->offset     = 0;
    150149  iop->handlers   = loc.handlers;
    151150  iop->file_info  = loc.node_access;
Note: See TracChangeset for help on using the changeset viewer.