Changeset 47901d8 in rtems


Ignore:
Timestamp:
Nov 8, 2001, 12:24:55 AM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
5354ab0
Parents:
f2278a8
Message:

2001-11-07 Jennifer Averett <jennifer@…>

Reported by Ibragimov Ilya <ibr@…> and tracked as PR49.

  • src/imfs/imfs_directory.c: Do not calculate the offset twice.
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libfs/ChangeLog

    rf2278a8 r47901d8  
     12001-11-07      Jennifer Averett <jennifer@OARcorp.com>
     2
     3        Reported by Ibragimov Ilya <ibr@oktet.ru> and tracked as PR49.
     4        *  src/imfs/imfs_directory.c: Do not calculate the offset twice.
     5
    162001-10-26      Victor V. Vengerov <vvv@oktet.ru>
    27
  • c/src/exec/libfs/src/imfs/imfs_directory.c

    rf2278a8 r47901d8  
    188188)
    189189{
    190   off_t normal_offset;
    191 
    192   normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
    193 
    194 
    195190  switch( whence ) {
    196191     case SEEK_SET:   /* absolute move from the start of the file */
    197         iop->offset = normal_offset;
    198         break;
    199 
    200192     case SEEK_CUR:   /* relative move */
    201         iop->offset = iop->offset + normal_offset;
     193        iop->offset = (iop->offset/sizeof(struct dirent)) *
     194              sizeof(struct dirent);
    202195        break;
    203196
     
    207200        set_errno_and_return_minus_one( EINVAL );
    208201        break;
    209 
    210202  }
    211203
  • c/src/libfs/ChangeLog

    rf2278a8 r47901d8  
     12001-11-07      Jennifer Averett <jennifer@OARcorp.com>
     2
     3        Reported by Ibragimov Ilya <ibr@oktet.ru> and tracked as PR49.
     4        *  src/imfs/imfs_directory.c: Do not calculate the offset twice.
     5
    162001-10-26      Victor V. Vengerov <vvv@oktet.ru>
    27
  • c/src/libfs/src/imfs/imfs_directory.c

    rf2278a8 r47901d8  
    188188)
    189189{
    190   off_t normal_offset;
    191 
    192   normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
    193 
    194 
    195190  switch( whence ) {
    196191     case SEEK_SET:   /* absolute move from the start of the file */
    197         iop->offset = normal_offset;
    198         break;
    199 
    200192     case SEEK_CUR:   /* relative move */
    201         iop->offset = iop->offset + normal_offset;
     193        iop->offset = (iop->offset/sizeof(struct dirent)) *
     194              sizeof(struct dirent);
    202195        break;
    203196
     
    207200        set_errno_and_return_minus_one( EINVAL );
    208201        break;
    209 
    210202  }
    211203
  • cpukit/libfs/ChangeLog

    rf2278a8 r47901d8  
     12001-11-07      Jennifer Averett <jennifer@OARcorp.com>
     2
     3        Reported by Ibragimov Ilya <ibr@oktet.ru> and tracked as PR49.
     4        *  src/imfs/imfs_directory.c: Do not calculate the offset twice.
     5
    162001-10-26      Victor V. Vengerov <vvv@oktet.ru>
    27
  • cpukit/libfs/src/imfs/imfs_directory.c

    rf2278a8 r47901d8  
    188188)
    189189{
    190   off_t normal_offset;
    191 
    192   normal_offset = (offset/sizeof(struct dirent)) * sizeof(struct dirent);
    193 
    194 
    195190  switch( whence ) {
    196191     case SEEK_SET:   /* absolute move from the start of the file */
    197         iop->offset = normal_offset;
    198         break;
    199 
    200192     case SEEK_CUR:   /* relative move */
    201         iop->offset = iop->offset + normal_offset;
     193        iop->offset = (iop->offset/sizeof(struct dirent)) *
     194              sizeof(struct dirent);
    202195        break;
    203196
     
    207200        set_errno_and_return_minus_one( EINVAL );
    208201        break;
    209 
    210202  }
    211203
Note: See TracChangeset for help on using the changeset viewer.