From d2a3d6fca86f6e0d78d8ce9a3498e0769e2efc99 Mon Sep 17 00:00:00 2001 From: batt Date: Fri, 19 Sep 2008 19:21:36 +0000 Subject: [PATCH] Add some log info; add a missing "!". git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1819 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/fs/battfs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bertos/fs/battfs.c b/bertos/fs/battfs.c index 014e421b..f4f29095 100644 --- a/bertos/fs/battfs.c +++ b/bertos/fs/battfs.c @@ -44,7 +44,7 @@ #include /* MIN, MAX */ #include /* cpu_to_xx */ -#define LOG_LEVEL LOG_LVL_WARNING +#define LOG_LEVEL LOG_LVL_INFO #define LOG_FORMAT LOG_FMT_VERBOSE #include @@ -351,7 +351,7 @@ static bool battfs_flushBuffer(struct BattFsSuper *disk) { if (disk->cache_dirty) { - TRACE; + LOG_INFO("Flushing to disk page %d\n", disk->curr_page); if (!disk->save(disk, disk->curr_page)) return false; disk->cache_dirty = false; @@ -367,14 +367,16 @@ static bool battfs_flushBuffer(struct BattFsSuper *disk) */ static bool battfs_loadPage(struct BattFsSuper *disk, pgcnt_t new_page) { + LOG_INFO("Loading page %d\n", new_page); if (disk->curr_page == new_page) return true; - if (battfs_flushBuffer(disk)) + if (!battfs_flushBuffer(disk)) return false; if (!disk->load(disk, new_page)) return false; + disk->curr_page = new_page; return true; } -- 2.25.1