Changeset 01c5b9d7 in rtems for cpukit/libfs/src/dosfs/fat.c


Ignore:
Timestamp:
Mar 25, 2003, 5:01:56 PM (17 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
bf71e25e
Parents:
2742cc3
Message:

2003-03-25 Thomas Doerfler <Thomas.Doerfler@…>

PR 367/filesystem

  • src/dosfs/Makefile.am, src/dosfs/fat.c, src/dosfs/fat.h, src/dosfs/fat_fat_operations.c, src/dosfs/fat_file.c, src/dosfs/msdos.h, src/dosfs/msdos_dir.c: Some bugs were still present in the DOSFS implementation:
    • FAT12 did not work properly on Big-Endian machines
    • Some synchronization and error handling problems were present
    • Some legal codings for EOC were not recognized
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/dosfs/fat.c

    r2742cc3 r01c5b9d7  
    261261
    262262    vol->spc = FAT_BR_SECTORS_PER_CLUSTER(boot_rec);
     263    /*
     264     * "sectors per cluster" of zero is invalid
     265     * (and would hang the following loop)
     266     */
     267    if (vol->spc == 0)
     268    {
     269        rtems_disk_release(vol->dd);
     270        set_errno_and_return_minus_one(EINVAL);
     271    }   
     272
    263273    for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
    264274         i >>= 1, vol->spc_log2++);
     
    527537        set_errno_and_return_minus_one( EIO );
    528538
    529     while ((cur_cln & fs_info->vol.mask) != fs_info->vol.eoc_val)
     539    while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
    530540    {
    531541        ret = fat_cluster_write(mt_entry, cur_cln, buf);
Note: See TracChangeset for help on using the changeset viewer.