From: batt Date: Fri, 19 Sep 2008 19:21:36 +0000 (+0000) Subject: Add some log info; add a missing "!". X-Git-Tag: 2.0.0~115 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d2a3d6fca86f6e0d78d8ce9a3498e0769e2efc99;p=bertos.git Add some log info; add a missing "!". git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1819 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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; }