mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 09:38:37 +08:00
Incorporate two FAT bugfixes reported by Sheref Younan.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3557 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -1718,3 +1718,6 @@
|
|||||||
implementation is incomplete on initial checkin.
|
implementation is incomplete on initial checkin.
|
||||||
* apps/examples/nxffs and configs/sim/nxffs: Add a test a a configuration that
|
* apps/examples/nxffs and configs/sim/nxffs: Add a test a a configuration that
|
||||||
will be used to verify NXFFS.
|
will be used to verify NXFFS.
|
||||||
|
* fs/fat/fs_fat32.c and fs_fat32util.c: Incorpated two bugs with fixed provided
|
||||||
|
by Sheref Younan. Thanks!
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1179,7 +1179,7 @@ static int fat_sync(FAR struct file *filep)
|
|||||||
* in the sector using the saved directory index.
|
* in the sector using the saved directory index.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
direntry = &fs->fs_buffer[ff->ff_dirindex * 32];
|
direntry = &fs->fs_buffer[(ff->ff_dirindex & DIRSEC_NDXMASK(fs)) * 32];
|
||||||
|
|
||||||
/* Set the archive bit, set the write time, and update
|
/* Set the archive bit, set the write time, and update
|
||||||
* anything that may have* changed in the directory
|
* anything that may have* changed in the directory
|
||||||
|
|||||||
@@ -649,7 +649,8 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable)
|
|||||||
goto errout_with_buffer;
|
goto errout_with_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fat_checkbootrecord(fs) != OK)
|
ret = fat_checkbootrecord(fs);
|
||||||
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
/* The contents of sector 0 is not a boot record. It could be a
|
/* The contents of sector 0 is not a boot record. It could be a
|
||||||
* partition, however. Assume it is a partition and get the offset
|
* partition, however. Assume it is a partition and get the offset
|
||||||
@@ -683,7 +684,8 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable)
|
|||||||
|
|
||||||
/* Check if this is a boot record */
|
/* Check if this is a boot record */
|
||||||
|
|
||||||
if (fat_checkbootrecord(fs) != OK)
|
ret = fat_checkbootrecord(fs);
|
||||||
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
fdbg("No valid MBR\n");
|
fdbg("No valid MBR\n");
|
||||||
goto errout_with_buffer;
|
goto errout_with_buffer;
|
||||||
|
|||||||
Reference in New Issue
Block a user