Index: trunk/kernel/fs/fatfs.c
===================================================================
--- trunk/kernel/fs/fatfs.c	(revision 435)
+++ trunk/kernel/fs/fatfs.c	(revision 438)
@@ -262,7 +262,7 @@
     "no FAT access required for first page\n");
 
-#if CONFIG_DEBUG_FATFS_GET_CLUSTER
+#if DEBUG_FATFS_GET_CLUSTER
 uint32_t cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_FATFS_GET_CLUSTER < cycle )
+if( DEBUG_FATFS_GET_CLUSTER < cycle )
 printk("\n[DBG] %s : thread %x enter / first_cluster_id %d / searched_index / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD, first_cluster_id, searched_page_index, cycle );
@@ -293,6 +293,6 @@
         next_cluster_id = current_page_buffer[current_page_offset];
 
-#if (CONFIG_DEBUG_FATFS_GET_CLUSTER & 1)
-if( CONFIG_DEBUG_FATFS_GET_CLUSTER < cycle )
+#if (DEBUG_FATFS_GET_CLUSTER & 1)
+if( DEBUG_FATFS_GET_CLUSTER < cycle )
 printk("\n[DBG] %s : traverse FAT / current_page_index = %d\n"
 "current_page_offset = %d / next_cluster_id = %d\n",
@@ -308,7 +308,7 @@
     if( next_cluster_id == 0xFFFFFFFF ) return EIO;
    
-#if CONFIG_DEBUG_FATFS_GET_CLUSTER
+#if DEBUG_FATFS_GET_CLUSTER
 cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_FATFS_GET_CLUSTER < cycle )
+if( DEBUG_FATFS_GET_CLUSTER < cycle )
 printk("\n[DBG] %s : thread %x exit / searched_cluster_id = %d / cycle %d\n",
 __FUNCTION__, CURRENT_THREAD, next_cluster_id / cycle );
@@ -345,7 +345,7 @@
     uint8_t     * buffer;
 
-#if CONFIG_DEBUG_FATFS_INIT
+#if DEBUG_FATFS_INIT
 uint32_t cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_FATFS_INIT < cycle )
+if( DEBUG_FATFS_INIT < cycle )
 printk("\n[DBG] %s : thread %x enter for fatfs_ctx = %x / cycle %d\n",
 __FUNCTION__ , CURRENT_THREAD , fatfs_ctx , cycle );
@@ -370,6 +370,6 @@
     "cannot access boot record\n" );
 
-#if (CONFIG_DEBUG_FATFS_INIT & 0x1)
-if( CONFIG_DEBUG_FATFS_INIT < cycle )
+#if (DEBUG_FATFS_INIT & 0x1)
+if( DEBUG_FATFS_INIT < cycle )
 {
     uint32_t   line;
@@ -448,7 +448,7 @@
     fatfs_ctx->fat_mapper_xp         = XPTR( local_cxy , fat_mapper );
 
-#if CONFIG_DEBUG_FATFS_INIT
+#if DEBUG_FATFS_INIT
 cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_FATFS_INIT < cycle )
+if( DEBUG_FATFS_INIT < cycle )
 printk("\n[DBG] %s : thread %x exit for fatfs_ctx = %x / cycle %d\n",
 __FUNCTION__ , CURRENT_THREAD , fatfs_ctx , cycle );
@@ -486,7 +486,7 @@
     inode = mapper->inode;
 
-#if CONFIG_DEBUG_FATFS_MOVE
+#if DEBUG_FATFS_MOVE
 uint32_t cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_FATFS_MOVE < cycle )
+if( DEBUG_FATFS_MOVE < cycle )
 printk("\n[DBG] %s : thread %x enter / page %d / inode %x / mapper %x / cycle %d\n",
 __FUNCTION__ , CURRENT_THREAD , index , inode , mapper , cycle );
@@ -507,6 +507,6 @@
         lba = fatfs_ctx->fat_begin_lba + (count * index);
  
-#if (CONFIG_DEBUG_FATFS_MOVE & 0x1)
-if( CONFIG_DEBUG_FATFS_MOVE < cycle )
+#if (DEBUG_FATFS_MOVE & 0x1)
+if( DEBUG_FATFS_MOVE < cycle )
 printk("\n[DBG] %s : access FAT on device / lba = %d\n", __FUNCTION__ , lba );
 #endif
@@ -541,6 +541,6 @@
             {
 
-#if (CONFIG_DEBUG_FATFS_MOVE & 0x1)
-if( CONFIG_DEBUG_FATFS_MOVE < cycle )
+#if (DEBUG_FATFS_MOVE & 0x1)
+if( DEBUG_FATFS_MOVE < cycle )
 print("\n[DBG] %s : access local FAT mapper\n"
 "fat_mapper_cxy = %x / fat_mapper_ptr = %x / first_cluster_id = %d / index = %d\n",
@@ -555,6 +555,6 @@
             {
 
-#if (CONFIG_DEBUG_FATFS_MOVE & 0x1)
-if( CONFIG_DEBUG_FATFS_MOVE < cycle )
+#if (DEBUG_FATFS_MOVE & 0x1)
+if( DEBUG_FATFS_MOVE < cycle )
 printk("\n[DBG] %s : access remote FAT mapper\n"
 "fat_mapper_cxy = %x / fat_mapper_ptr = %x / first_cluster_id = %d / index = %d\n",
@@ -572,6 +572,6 @@
         }
 
-#if (CONFIG_DEBUG_FATFS_MOVE & 0x1)
-if( CONFIG_DEBUG_FATFS_MOVE < cycle )
+#if (DEBUG_FATFS_MOVE & 0x1)
+if( DEBUG_FATFS_MOVE < cycle )
 printk("\n[DBG] %s : access device for inode %x / cluster_id %d\n",
 __FUNCTION__ , inode , searched_cluster_id );
@@ -588,13 +588,13 @@
     }
 
-#if CONFIG_DEBUG_FATFS_MOVE
+#if DEBUG_FATFS_MOVE
 cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_FATFS_MOVE < cycle )
+if( DEBUG_FATFS_MOVE < cycle )
 printk("\n[DBG] %s : thread %x exit / page %d / inode %x / mapper %x / cycle %d\n",
 __FUNCTION__ , CURRENT_THREAD , index , inode , mapper , cycle );
 #endif
 
-#if (CONFIG_DEBUG_FATFS_MOVE & 0x1)
-if( CONFIG_DEBUG_FATFS_MOVE < cycle )
+#if (DEBUG_FATFS_MOVE & 0x1)
+if( DEBUG_FATFS_MOVE < cycle )
 {
     uint32_t * tab = (uint32_t *)buffer;
@@ -623,7 +623,7 @@
     // - scan the directory entries in each 4 Kbytes page
 
-#if CONFIG_DEBUG_FATFS_LOAD
+#if DEBUG_FATFS_LOAD
 uint32_t cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_FATFS_LOAD < cycle )
+if( DEBUG_FATFS_LOAD < cycle )
 printk("\n[DBG] %s : thread %x enter for child <%s> in parent inode %x / cycle %d\n",
 __FUNCTION__ , CURRENT_THREAD , name , parent_inode , cycle );
@@ -665,6 +665,6 @@
         base = (uint8_t *)GET_PTR( base_xp );
 
-#if (CONFIG_DEBUG_FATFS_LOAD & 0x1)
-if( CONFIG_DEBUG_FATFS_LOAD < cycle )
+#if (DEBUG_FATFS_LOAD & 0x1)
+if( DEBUG_FATFS_LOAD < cycle )
 {
     uint32_t * buf = (uint32_t *)base;
@@ -749,7 +749,7 @@
     {
 
-#if CONFIG_DEBUG_FATFS_LOAD
+#if DEBUG_FATFS_LOAD
 cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_FATFS_LOAD < cycle )
+if( DEBUG_FATFS_LOAD < cycle )
 printk("\n[DBG] %s : thread %x exit / child <%s> not found / cycle %d\n",
 __FUNCTION__ , CURRENT_THREAD, name, cycle );
@@ -771,7 +771,7 @@
         hal_remote_sw( XPTR( child_cxy , &child_ptr->extend ) , cluster );
 
-#if CONFIG_DEBUG_FATFS_LOAD
+#if DEBUG_FATFS_LOAD
 cycle = (uint32_t)hal_get_cycles();
-if( CONFIG_DEBUG_FATFS_LOAD < cycle )
+if( DEBUG_FATFS_LOAD < cycle )
 printk("\n[DBG] %s : thread %x exit / child <%s> loaded / cycle %d\n",
 __FUNCTION__ , CURRENT_THREAD, name, cycle );
