X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_yaffs1.c;h=c879f57f921116e14243c87692ee079aaf7737da;hp=4d10096374ef9f7ac42d9065defcceb0ffd78d67;hb=6a1296f4458cb8eff1535a8618f45379655e5aa5;hpb=fb1a7ee223619260cfd9b6366fd78747cc572cd5 diff --git a/yaffs_yaffs1.c b/yaffs_yaffs1.c index 4d10096..c879f57 100644 --- a/yaffs_yaffs1.c +++ b/yaffs_yaffs1.c @@ -42,9 +42,9 @@ int yaffs1_scan(struct yaffs_dev *dev) u8 *chunk_data; - T(YAFFS_TRACE_SCAN, - (TSTR("yaffs1_scan starts intstartblk %d intendblk %d..." TENDSTR), - dev->internal_start_block, dev->internal_end_block)); + yaffs_trace(YAFFS_TRACE_SCAN, + "yaffs1_scan starts intstartblk %d intendblk %d...", + dev->internal_start_block, dev->internal_end_block); chunk_data = yaffs_get_temp_buffer(dev, __LINE__); @@ -66,16 +66,15 @@ int yaffs1_scan(struct yaffs_dev *dev) if (bi->seq_number == YAFFS_SEQUENCE_BAD_BLOCK) bi->block_state = state = YAFFS_BLOCK_STATE_DEAD; - T(YAFFS_TRACE_SCAN_DEBUG, - (TSTR("Block scanning block %d state %d seq %d" TENDSTR), blk, - state, seq_number)); + yaffs_trace(YAFFS_TRACE_SCAN_DEBUG, + "Block scanning block %d state %d seq %d", + blk, state, seq_number); if (state == YAFFS_BLOCK_STATE_DEAD) { - T(YAFFS_TRACE_BAD_BLOCKS, - (TSTR("block %d is bad" TENDSTR), blk)); + yaffs_trace(YAFFS_TRACE_BAD_BLOCKS, + "block %d is bad", blk); } else if (state == YAFFS_BLOCK_STATE_EMPTY) { - T(YAFFS_TRACE_SCAN_DEBUG, - (TSTR("Block empty " TENDSTR))); + yaffs_trace(YAFFS_TRACE_SCAN_DEBUG, "Block empty "); dev->n_erased_blocks++; dev->n_free_chunks += dev->param.chunks_per_block; } @@ -111,7 +110,6 @@ int yaffs1_scan(struct yaffs_dev *dev) */ deleted++; dev->n_free_chunks++; - /*T((" %d %d deleted\n",blk,c)); */ } else if (!tags.chunk_used) { /* An unassigned chunk in the block * This means that either the block is empty or @@ -124,10 +122,9 @@ int yaffs1_scan(struct yaffs_dev *dev) dev->n_erased_blocks++; } else { /* this is the block being allocated from */ - T(YAFFS_TRACE_SCAN, - (TSTR - (" Allocating from %d %d" TENDSTR), - blk, c)); + yaffs_trace(YAFFS_TRACE_SCAN, + " Allocating from %d %d", + blk, c); state = YAFFS_BLOCK_STATE_ALLOCATING; dev->alloc_block = blk; dev->alloc_page = c; @@ -180,7 +177,6 @@ int yaffs1_scan(struct yaffs_dev *dev) } } - /* T((" %d %d data %d %d\n",blk,c,tags.obj_id,tags.chunk_id)); */ } else { /* chunk_id == 0, so it is an ObjectHeader. * Thus, we read in the object header and make the object @@ -226,11 +222,10 @@ int yaffs1_scan(struct yaffs_dev *dev) fixer->obj_id = tags.obj_id; fixer->shadowed_id = oh->shadows_obj; - T(YAFFS_TRACE_SCAN, - (TSTR - (" Shadow fixer: %d shadows %d" - TENDSTR), fixer->obj_id, - fixer->shadowed_id)); + yaffs_trace(YAFFS_TRACE_SCAN, + " Shadow fixer: %d shadows %d", + fixer->obj_id, + fixer->shadowed_id); } @@ -308,10 +303,9 @@ int yaffs1_scan(struct yaffs_dev *dev) * We're trying to use a non-directory as a directory */ - T(YAFFS_TRACE_ERROR, - (TSTR - ("yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found." - TENDSTR))); + yaffs_trace(YAFFS_TRACE_ERROR, + "yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found." + ); parent = dev->lost_n_found; } @@ -431,7 +425,7 @@ int yaffs1_scan(struct yaffs_dev *dev) if (alloc_failed) return YAFFS_FAIL; - T(YAFFS_TRACE_SCAN, (TSTR("yaffs1_scan ends" TENDSTR))); + yaffs_trace(YAFFS_TRACE_SCAN, "yaffs1_scan ends"); return YAFFS_OK; }