diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-02-24 16:40:19 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2012-03-13 12:24:16 +0100 |
commit | 70927458b7d9b8579cb98782423a8afac4fa624e (patch) | |
tree | 44d7b94c8f0629b271d44b82f10cf62fa54a80ae /cpukit/libfs/src/imfs/imfs_debug.c | |
parent | IMFS: Removed superfluous imfs_dir_open() (diff) | |
download | rtems-70927458b7d9b8579cb98782423a8afac4fa624e.tar.bz2 |
IMFS: New support functions
Add and use IMFS_type() and IMFS_is_directory().
Diffstat (limited to '')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_debug.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 ); } } |