From 70927458b7d9b8579cb98782423a8afac4fa624e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 24 Feb 2012 16:40:19 +0100 Subject: IMFS: New support functions Add and use IMFS_type() and IMFS_is_directory(). --- cpukit/libfs/src/imfs/imfs_debug.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpukit/libfs/src/imfs/imfs_debug.c') diff --git a/cpukit/libfs/src/imfs/imfs_debug.c b/cpukit/libfs/src/imfs/imfs_debug.c index 091237275d..8ae0bc6756 100644 --- a/cpukit/libfs/src/imfs/imfs_debug.c +++ b/cpukit/libfs/src/imfs/imfs_debug.c @@ -33,7 +33,7 @@ static void IMFS_print_jnode( IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); - switch( the_jnode->type ) { + switch( IMFS_type( the_jnode ) ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; @@ -78,7 +78,7 @@ static void IMFS_print_jnode( return; default: - fprintf(stdout, " bad type %d\n", the_jnode->type ); + fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); @@ -103,7 +103,7 @@ static void IMFS_dump_directory( IMFS_assert( the_directory ); IMFS_assert( level >= 0 ); - IMFS_assert( the_directory->type == IMFS_DIRECTORY ); + IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; @@ -116,7 +116,7 @@ static void IMFS_dump_directory( for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); - if ( the_jnode->type == IMFS_DIRECTORY ) + if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); } } -- cgit v1.2.3