Fixes a bug in f_write() with FLUSH_ON_NEW_CLUSTER and FLUSH_ON_NEW_SECTOR macros.
Fork of FATFileSystem by
Revision 6:e78a7c350558, committed 2015-11-06
- Comitter:
- rmardini
- Date:
- Fri Nov 06 23:25:21 2015 +0000
- Parent:
- 5:b3b3370574cf
- Commit message:
- Fixes a bug in f_write() with FLUSH_ON_NEW_CLUSTER and FLUSH_ON_NEW_SECTOR macros.
Changed in this revision
ChaN/ff.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/ChaN/ff.cpp Thu Aug 13 10:15:39 2015 +0100 +++ b/ChaN/ff.cpp Fri Nov 06 23:25:21 2015 +0000 @@ -2686,7 +2686,7 @@ fp->clust = clst; /* Update current cluster */ if (fp->sclust == 0) fp->sclust = clst; /* Set start cluster if the first write */ -#ifdef FLUSH_ON_NEW_CLUSTER +#if FLUSH_ON_NEW_CLUSTER // We do not need to flush for the first cluster if (fp->fptr != 0) { need_sync = true; @@ -2726,7 +2726,7 @@ #endif #endif wcnt = SS(fp->fs) * cc; /* Number of bytes transferred */ -#ifdef FLUSH_ON_NEW_SECTOR +#if FLUSH_ON_NEW_SECTOR need_sync = true; #endif continue;