Add missing page erase.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 19 Sep 2008 19:39:22 +0000 (19:39 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 19 Sep 2008 19:39:22 +0000 (19:39 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1821 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/fs/battfs.c

index f4f29095e468d10903bb1422c01e0b242f7e36aa..9c72f74928c024bf331df8bde3d5118ba3d81482 100644 (file)
@@ -352,6 +352,9 @@ static bool battfs_flushBuffer(struct BattFsSuper *disk)
        if (disk->cache_dirty)
        {
                LOG_INFO("Flushing to disk page %d\n", disk->curr_page);
+               if (!disk->erase(disk, disk->curr_page))
+                       return false;
+
                if (!disk->save(disk, disk->curr_page))
                        return false;
                disk->cache_dirty = false;