From bfac6a7577b20a4f8410446902658294f848da9f Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 18 Oct 2000 16:53:57 +0000 Subject: 2000-10-18 Chris Johns * libfs created. * libc/deviceio.c, libc/imfs_getchild.c, libc/imfs_readlink.c, libc/imfs.h, libc/imfs_gtkn.c, libc/imfs_rmnod.c, libc/imfs_chown.c, libc/imfs_handlers_device.c, libc/imfs_stat.c, libc/imfs_creat.c, libc/imfs_handlers_directory.c, libc/imfs_symlink.c, libc/imfs_debug.c, libc/imfs_handlers_link.c, libc/imfs_unixstub.c, libc/imfs_directory.c, libc/imfs_handlers_memfile.c, libc/imfs_unlink.c, libc/imfs_eval.c, libc/imfs_init.c, libc/imfs_unmount.c, libc/imfs_fchmod.c, libc/imfs_initsupp.c, libc/imfs_utime.c, libc/imfs_fcntl.c, libc/imfs_link.c, libc/memfile.c, libc/imfs_fdatasync.c, libc/imfs_mknod.c, libc/miniimfs_init.c, libc/imfs_free.c, libc/imfs_mount.c, libc/imfs_fsunmount.c, libc/imfs_ntype.c: Moved to libfs/src/imfs. * Makefile.am: Modified to reflect above. --- c/src/lib/libc/imfs_debug.c | 159 -------------------------------------------- 1 file changed, 159 deletions(-) delete mode 100644 c/src/lib/libc/imfs_debug.c (limited to 'c/src/lib/libc/imfs_debug.c') diff --git a/c/src/lib/libc/imfs_debug.c b/c/src/lib/libc/imfs_debug.c deleted file mode 100644 index f8151c6c0f..0000000000 --- a/c/src/lib/libc/imfs_debug.c +++ /dev/null @@ -1,159 +0,0 @@ -/* - * IMFS debug support routines - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.OARcorp.com/rtems/license.html. - * - * $Id$ - */ - -#include -#include -#include -#include -#include -#include /* for close */ - -#include -#include - -#include "imfs.h" -#include "libio_.h" - -/* - * IMFS_types - * - * Printable names for each of the IMFS file system types. - */ - -char *IMFS_types[ IMFS_NUMBER_OF_TYPES ] = { - "directory", - "device", - "link", - "memory file" -}; - -/* - * IMFS_print_jnode - * - * This routine prints the contents of the specified jnode. - */ - -void IMFS_print_jnode( - IMFS_jnode_t *the_jnode -) -{ - assert( the_jnode ); - - printf( "%s", the_jnode->name ); - switch( the_jnode->type ) { - case IMFS_DIRECTORY: - printf( "/" ); - break; - - case IMFS_DEVICE: - printf( " (device %d, %d)", - the_jnode->info.device.major, the_jnode->info.device.minor ); - break; - - case IMFS_MEMORY_FILE: - printf( " (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 - ); - break; - - case IMFS_HARD_LINK: - printf( " links not printed\n" ); - assert(0); - break; - - case IMFS_SYM_LINK: - printf( " links not printed\n" ); - assert(0); - break; - - default: - printf( " bad type %d\n", the_jnode->type ); - assert(0); - break; - } - puts(""); -} - -/* - * IMFS_dump_directory - * - * This routine prints the contents of a directory in the IMFS. If a - * directory is encountered, then this routine will recurse to process - * the subdirectory. - */ - -void IMFS_dump_directory( - IMFS_jnode_t *the_directory, - int level -) -{ - Chain_Node *the_node; - Chain_Control *the_chain; - IMFS_jnode_t *the_jnode; - int i; - - assert( the_directory ); - - assert( level >= 0 ); - - assert( the_directory->type == IMFS_DIRECTORY ); - - the_chain = &the_directory->info.directory.Entries; - - for ( the_node = the_chain->first; - !_Chain_Is_tail( the_chain, the_node ); - the_node = the_node->next ) { - - the_jnode = (IMFS_jnode_t *) the_node; - - for ( i=0 ; i<=level ; i++ ) - printf( "...." ); - IMFS_print_jnode( the_jnode ); - if ( the_jnode->type == IMFS_DIRECTORY ) - IMFS_dump_directory( the_jnode, level + 1 ); - } -} - -/* - * IMFS_dump - * - * This routine dumps the entire IMFS that is mounted at the root - * directory. - * - * NOTE: Assuming the "/" directory is bad. - * Not checking that the starting directory is in an IMFS is bad. - */ - -void IMFS_dump( void ) -{ - printf( "*************** Dump of Entire IMFS ***************\n" ); - printf( "/\n" ); - IMFS_dump_directory( rtems_filesystem_root.node_access, 0 ); - printf( "*************** End of Dump ***************\n" ); -} - -/* - * IMFS_memfile_maximum_size() - * - * This routine returns the size of the largest file which can be created - * using the IMFS memory file type. - * - */ - -int IMFS_memfile_maximum_size( void ) -{ - return IMFS_MEMFILE_MAXIMUM_SIZE; -} -- cgit v1.2.3