From 3b2c47300abf5a0b1fe36e0b758c7f2512a846b3 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Sat, 17 Apr 2004 08:39:22 +0000 Subject: 2004-04-17 Ralf Corsepius * libfs/src/imfs/imfs_debug.c, libfs/src/imfs/memfile.c: Use fprintf(stdout,...) instead of printf. --- cpukit/libfs/src/imfs/imfs_debug.c | 26 +++++++++++++------------- cpukit/libfs/src/imfs/memfile.c | 22 +++++++++++----------- 2 files changed, 24 insertions(+), 24 deletions(-) (limited to 'cpukit/libfs') diff --git a/cpukit/libfs/src/imfs/imfs_debug.c b/cpukit/libfs/src/imfs/imfs_debug.c index 094e90657d..e42198a4b8 100644 --- a/cpukit/libfs/src/imfs/imfs_debug.c +++ b/cpukit/libfs/src/imfs/imfs_debug.c @@ -54,19 +54,19 @@ void IMFS_print_jnode( { assert( the_jnode ); - printf( "%s", the_jnode->name ); + fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: - printf( "/" ); + fprintf(stdout, "/" ); break; case IMFS_DEVICE: - printf( " (device %d, %d)", + fprintf(stdout, " (device %d, %d)", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: - printf( " (file %d %p)", + fprintf(stdout, " (file %d %p)", (int)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); @@ -75,29 +75,29 @@ void IMFS_print_jnode( case IMFS_MEMORY_FILE: /* Useful when debugging .. varies between targets */ #if 0 - printf( " (file %d %p %p %p)", + fprintf(stdout, " (file %d %p %p %p)", (int)the_jnode->info.file.size, the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else - printf( " (file %d)", (int)the_jnode->info.file.size ); + fprintf(stdout, " (file %d)", (int)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: - printf( " links not printed\n" ); + fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: - printf( " links not printed\n" ); + fprintf(stdout, " links not printed\n" ); assert(0); break; default: - printf( " bad type %d\n", the_jnode->type ); + fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } @@ -137,7 +137,7 @@ void IMFS_dump_directory( the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) - printf( "...." ); + fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); @@ -156,10 +156,10 @@ void IMFS_dump_directory( void IMFS_dump( void ) { - printf( "*************** Dump of Entire IMFS ***************\n" ); - printf( "/\n" ); + fprintf(stdout, "*************** Dump of Entire IMFS ***************\n" ); + fprintf(stdout, "/\n" ); IMFS_dump_directory( rtems_filesystem_root.node_access, 0 ); - printf( "*************** End of Dump ***************\n" ); + fprintf(stdout, "*************** End of Dump ***************\n" ); } /* diff --git a/cpukit/libfs/src/imfs/memfile.c b/cpukit/libfs/src/imfs/memfile.c index 531caaa1fb..1a68531c38 100644 --- a/cpukit/libfs/src/imfs/memfile.c +++ b/cpukit/libfs/src/imfs/memfile.c @@ -354,7 +354,7 @@ MEMFILE_STATIC int IMFS_memfile_addblock( return 0; #if 0 - printf( "%d %p", block, block_entry_ptr ); + fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif @@ -778,7 +778,7 @@ MEMFILE_STATIC ssize_t IMFS_memfile_write( if ( !block_ptr ) return copied; #if 0 -printf( "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); +fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; @@ -798,7 +798,7 @@ printf( "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, sr if ( !block_ptr ) return copied; #if 0 -printf( "write %d in %d: %*s\n", to_copy, block, to_copy, src ); +fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; @@ -820,7 +820,7 @@ printf( "write %d in %d: %*s\n", to_copy, block, to_copy, src ); if ( !block_ptr ) return copied; #if 0 -printf( "write %d in %d: %*s\n", to_copy, block, to_copy, src ); +fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; @@ -856,7 +856,7 @@ block_p *IMFS_memfile_get_block_pointer( block_p *p; p = IMFS_memfile_get_block_pointer_DEBUG( the_jnode, block, malloc_it ); - printf( "(%d -> %p) ", block, p ); + fprintf(stdout, "(%d -> %p) ", block, p ); return p; } @@ -900,7 +900,7 @@ block_p *IMFS_memfile_get_block_pointer( if ( my_block <= LAST_INDIRECT ) { #if 0 -printf( "(s %d) ", block ); +fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; @@ -928,7 +928,7 @@ fflush(stdout); if ( my_block <= LAST_DOUBLY_INDIRECT ) { #if 0 -printf( "(d %d) ", block ); +fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif @@ -966,7 +966,7 @@ fflush(stdout); return 0; #if 0 -printf( "(d %d %d %d %d %p %p) ", block, my_block, doubly, +fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif @@ -974,7 +974,7 @@ fflush(stdout); } #if 0 -printf( "(t %d) ", block ); +fprintf(stdout, "(t %d) ", block ); fflush(stdout); #endif /* @@ -1021,7 +1021,7 @@ fflush(stdout); return 0; #if 0 -printf( "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); +fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; @@ -1072,7 +1072,7 @@ void memfile_free_block( ) { #if 0 -printf( "(d %p) ", memory ); +fprintf(stdout, "(d %p) ", memory ); fflush(stdout); #endif free(memory); -- cgit v1.2.3