diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2003-03-25 17:01:45 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2003-03-25 17:01:45 +0000 |
commit | c151cfc347d29c7934db74aa4c7aeceaab0de83f (patch) | |
tree | e0d9e3ed17c529fe9aff0bf4463ced288fbb54ab /cpukit/libfs/src/dosfs/fat.h | |
parent | 2003-03-25 Till Straumann <strauman@slac.stanford.edu> (diff) | |
download | rtems-c151cfc347d29c7934db74aa4c7aeceaab0de83f.tar.bz2 |
2003-03-25 Thomas Doerfler <Thomas.Doerfler@imd-systems.de>
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
Diffstat (limited to 'cpukit/libfs/src/dosfs/fat.h')
-rw-r--r-- | cpukit/libfs/src/dosfs/fat.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cpukit/libfs/src/dosfs/fat.h b/cpukit/libfs/src/dosfs/fat.h index ef7fa7b8d4..b8361d55cf 100644 --- a/cpukit/libfs/src/dosfs/fat.h +++ b/cpukit/libfs/src/dosfs/fat.h @@ -83,9 +83,9 @@ extern "C" { #define FAT_UNDEFINED_VALUE (unsigned32)0xFFFFFFFF -#define FAT_FAT12_EOC 0x0FFF -#define FAT_FAT16_EOC 0xFFFF -#define FAT_FAT32_EOC (unsigned32)0x0FFFFFFF +#define FAT_FAT12_EOC 0x0FF8 +#define FAT_FAT16_EOC 0xFFF8 +#define FAT_FAT32_EOC (unsigned32)0x0FFFFFF8 #define FAT_FAT12_FREE 0x0000 #define FAT_FAT16_FREE 0x0000 @@ -306,6 +306,7 @@ fat_buf_access(fat_fs_info_t *fs_info, unsigned32 blk, int op_type, if (sc != RTEMS_SUCCESSFUL) set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; + fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } @@ -321,9 +322,10 @@ fat_buf_access(fat_fs_info_t *fs_info, unsigned32 blk, int op_type, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); + fs_info->c.state = FAT_CACHE_EMPTY; + fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) set_errno_and_return_minus_one(EIO); - fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) { @@ -347,6 +349,7 @@ fat_buf_access(fat_fs_info_t *fs_info, unsigned32 blk, int op_type, else { sc = rtems_bdbuf_release(fs_info->c.buf); + fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) set_errno_and_return_minus_one(EIO); @@ -358,6 +361,7 @@ fat_buf_access(fat_fs_info_t *fs_info, unsigned32 blk, int op_type, if (sc != RTEMS_SUCCESSFUL) set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; + fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; return RC_OK; |