Changeset 616


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

fat32: check for LFN entry before invalidating it

Otherwise we could invalidate previous entries accidentally...

File:
1 edited

Legend:

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

    r606 r616  
    19691969    while ( nb_lfn )
    19701970    {
    1971         if (offset == 0)  // me must load buffer for (cluster_id - 1)
     1971        if (offset == 0)  // we must load buffer for (cluster_id - 1)
    19721972        {
    19731973            if ( _get_buffer_from_cache( inode->parent,
     
    19761976            buffer       = pdesc->buffer;
    19771977            pdesc->dirty = 1;
    1978             offset       = 4064;
    1979         }
    1980         else
    1981         {
    1982             offset = offset - 32;
    1983         }
     1978            offset       = 4096;
     1979        }
     1980
     1981        offset = offset - 32;
     1982
     1983        // check for LFN entry
     1984        if ( _read_entry( DIR_ATTR , buffer + offset , 0 ) != ATTR_LONG_NAME_MASK )
     1985            break;
    19841986
    19851987        // invalidate LFN entry
Note: See TracChangeset for help on using the changeset viewer.