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


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.h

    r2742cc3 r01c5b9d7  
    8484#define FAT_UNDEFINED_VALUE     (unsigned32)0xFFFFFFFF
    8585
    86 #define FAT_FAT12_EOC          0x0FFF
    87 #define FAT_FAT16_EOC          0xFFFF
    88 #define FAT_FAT32_EOC          (unsigned32)0x0FFFFFFF
     86#define FAT_FAT12_EOC          0x0FF8
     87#define FAT_FAT16_EOC          0xFFF8
     88#define FAT_FAT32_EOC          (unsigned32)0x0FFFFFF8
    8989
    9090#define FAT_FAT12_FREE         0x0000
     
    307307            set_errno_and_return_minus_one(EIO);
    308308        fs_info->c.blk_num = blk;   
     309        fs_info->c.modified = 0;   
    309310        fs_info->c.state = FAT_CACHE_ACTUAL;   
    310311    }
     
    322323           
    323324            sc = rtems_bdbuf_release_modified(fs_info->c.buf);
     325            fs_info->c.state = FAT_CACHE_EMPTY;
     326            fs_info->c.modified = 0;   
    324327            if (sc != RTEMS_SUCCESSFUL)
    325328                set_errno_and_return_minus_one(EIO);
    326             fs_info->c.modified = 0;   
    327329           
    328330            if (sec_of_fat && !fs_info->vol.mirror)
     
    348350        {
    349351            sc = rtems_bdbuf_release(fs_info->c.buf);
     352            fs_info->c.state = FAT_CACHE_EMPTY;
    350353            if (sc != RTEMS_SUCCESSFUL)
    351354                set_errno_and_return_minus_one(EIO);
     
    359362            set_errno_and_return_minus_one(EIO);
    360363        fs_info->c.blk_num = blk;
     364        fs_info->c.state = FAT_CACHE_ACTUAL;
    361365    }
    362366    *buf = fs_info->c.buf;
Note: See TracChangeset for help on using the changeset viewer.