From 8c60fefb5bbf501b3930bd40c9187b37798d7909 Mon Sep 17 00:00:00 2001 From: batt Date: Fri, 19 Sep 2008 19:39:22 +0000 Subject: [PATCH] Add missing page erase. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1821 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/fs/battfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bertos/fs/battfs.c b/bertos/fs/battfs.c index f4f29095..9c72f749 100644 --- a/bertos/fs/battfs.c +++ b/bertos/fs/battfs.c @@ -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; -- 2.25.1