mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 06:03:34 +08:00
Important FAT fix. Bad test would cause many un-necessary writes to FLASH.
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5102 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -3267,4 +3267,8 @@
|
||||
* Kconfig: Verify configuration settings for the STM32. This include
|
||||
changes in the way that the external SRAM is configured: Define
|
||||
CONFIG_HEAP2_SIZE (decimal) instead of CONFIG_HEAP2_END (hex).
|
||||
* tools/configure.sh: Don't append the apps directory path setting
|
||||
if the correct setting is already in defined in the defconfig file.
|
||||
* fs/fat/fs_utils.c: Improper constructed bool expression. This
|
||||
would cause many unnecessary writes to FLASH (Thanks Ronen Vainish).
|
||||
|
||||
|
||||
@@ -1563,7 +1563,7 @@ int fat_ffcacheflush(struct fat_mountpt_s *fs, struct fat_file_s *ff)
|
||||
*/
|
||||
|
||||
if (ff->ff_cachesector &&
|
||||
ff->ff_bflags && (FFBUFF_DIRTY|FFBUFF_VALID) == (FFBUFF_DIRTY|FFBUFF_VALID))
|
||||
(ff->ff_bflags & (FFBUFF_DIRTY|FFBUFF_VALID)) == (FFBUFF_DIRTY|FFBUFF_VALID))
|
||||
{
|
||||
/* Write the dirty sector */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user