From 958a103436443f9c432666a039deef3c2ac18da4 Mon Sep 17 00:00:00 2001 From: batt Date: Tue, 23 Sep 2008 13:44:50 +0000 Subject: [PATCH] Add some debug features. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1833 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/fs/battfs.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bertos/fs/battfs.c b/bertos/fs/battfs.c index b15460a0..f3502c7c 100644 --- a/bertos/fs/battfs.c +++ b/bertos/fs/battfs.c @@ -44,16 +44,16 @@ #include /* MIN, MAX */ #include /* cpu_to_xx */ -#define LOG_LEVEL LOG_LVL_WARN +#define LOG_LEVEL LOG_LVL_INFO #define LOG_FORMAT LOG_FMT_VERBOSE #include #include /* memset, memmove */ -#ifdef _DEBUG +#if LOG_LEVEL >= LOG_LVL_INFO static void dumpPageArray(struct BattFsSuper *disk) { - kprintf("Page array dump:"); + kprintf("Page array dump, free_page_start %d:", disk->free_page_start); for (pgcnt_t i = 0; i < disk->page_count; i++) { if (!(i % 16)) @@ -483,8 +483,13 @@ bool battfs_init(struct BattFsSuper *disk) LOG_ERR("filling page array\n"); return false; } + #if LOG_LEVEL > LOG_LVL_INFO + dumpPageArray(disk) + #endif #warning TODO: shuffle free blocks - + //#if LOG_LEVEL > LOG_LVL_INFO + // dumpPageArray(disk) + //#endif /* Init list for opened files. */ LIST_INIT(&disk->file_opened_list); return true; -- 2.25.1