summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-06 14:46:08 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-06 14:46:08 +0000
commitd511d207874d1918ee2436308aeadd57dfd48e4b (patch)
treef495a1f74d642f018d8bd4260ac7e62794f89348
parentf12b71e69f745d2dde28a83c8a0c1ad3d81062d6 (diff)
downloadpx4-nuttx-d511d207874d1918ee2436308aeadd57dfd48e4b.tar.gz
px4-nuttx-d511d207874d1918ee2436308aeadd57dfd48e4b.tar.bz2
px4-nuttx-d511d207874d1918ee2436308aeadd57dfd48e4b.zip
Important FAT fix. Bad test would cause many un-necessary writes to FLASH.
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5102 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/ChangeLog4
-rw-r--r--nuttx/fs/fat/fs_fat32util.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 66f56401d..3608c33c1 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -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).
diff --git a/nuttx/fs/fat/fs_fat32util.c b/nuttx/fs/fat/fs_fat32util.c
index 397467c41..b88046d79 100644
--- a/nuttx/fs/fat/fs_fat32util.c
+++ b/nuttx/fs/fat/fs_fat32util.c
@@ -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 */