Changeset 620


Ignore:
Timestamp:
Jul 16, 2015, 3:29:10 PM (9 years ago)
Author:
guerin
Message:

fat32: don't skip entries twice in _get_nb_entries()

The offset was incremented twice when stumbling upon free or LFN
entries, so the count was underestimated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_fat32/fat32.c

    r619 r620  
    265265//////////////////////////////////////////////////////////////////////////////////
    266266// The following function returns in the "nb_entries" argument the number of files
    267 // (or directories) contained in a directory identidied by the "inode " pointer.
     267// (or directories) contained in a directory identified by the "inode " pointer.
    268268// It returns  0 if success.
    269269// It returns  1 if error.
     
    16341634                                     cluster_id,
    16351635                                     &pdesc ) )   return 1;
    1636 
    16371636        buffer = pdesc->buffer;
    16381637       
     
    16571656            else                                      // NORMAL entry
    16581657            {
     1658                offset = offset + 32;
    16591659                count++;
    16601660            }
    1661 
    1662             offset = offset + 32;
    1663 
    16641661        }  // end loop on directory entries
    16651662
Note: See TracChangeset for help on using the changeset viewer.