From 7b0001f79554baacc7ae8470ec137d09ddb71cb1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 25 Oct 2000 16:56:11 +0000 Subject: 2000-10-24 Joel Sherrill * libc/ioman.c: Moved to libfs. * libc/Makefile.am: Removed ioman.c as part of moving it to libfs. * libc/base_fs.c: Removed include of imfs.h and reworded comment to avoid being IMFS specific. * libc/libio.h: Removed prototype of IMFS_ops since it should not be in this file. * libc/mount.c: Removed IMFS specific configuration information. * libc/unmount.c: Removed include of imfs.h and reworded comment to avoid being IMFS specific. --- c/src/exec/libcsupport/include/rtems/libio.h | 4 - c/src/exec/libcsupport/src/Makefile.am | 2 +- c/src/exec/libcsupport/src/base_fs.c | 7 +- c/src/exec/libcsupport/src/mount.c | 22 +----- c/src/exec/libcsupport/src/unmount.c | 5 -- c/src/lib/ChangeLog | 12 +++ c/src/lib/include/rtems/libio.h | 4 - c/src/lib/libc/Makefile.am | 2 +- c/src/lib/libc/base_fs.c | 7 +- c/src/lib/libc/ioman.c | 106 --------------------------- c/src/lib/libc/libio.h | 4 - c/src/lib/libc/mount.c | 22 +----- c/src/lib/libc/unmount.c | 5 -- 13 files changed, 24 insertions(+), 178 deletions(-) delete mode 100644 c/src/lib/libc/ioman.c (limited to 'c') diff --git a/c/src/exec/libcsupport/include/rtems/libio.h b/c/src/exec/libcsupport/include/rtems/libio.h index 6bd626bc5a..1d4a2621d4 100644 --- a/c/src/exec/libcsupport/include/rtems/libio.h +++ b/c/src/exec/libcsupport/include/rtems/libio.h @@ -267,10 +267,6 @@ typedef struct { rtems_filesystem_readlink_t readlink_h; } rtems_filesystem_operations_table; -#define IMFS_FILE_SYSTEM IMFS_ops -extern rtems_filesystem_operations_table IMFS_ops; - - /* * Structure used to determine a location/filesystem in the tree. */ diff --git a/c/src/exec/libcsupport/src/Makefile.am b/c/src/exec/libcsupport/src/Makefile.am index 5861b049fa..72447d2094 100644 --- a/c/src/exec/libcsupport/src/Makefile.am +++ b/c/src/exec/libcsupport/src/Makefile.am @@ -11,7 +11,7 @@ ERROR_C_FILES = error.c ASSOCIATION_C_FILES = assoc.c assocnamebad.c -BASE_FS_C_FILES = base_fs.c mount.c unmount.c ioman.c libio.c \ +BASE_FS_C_FILES = base_fs.c mount.c unmount.c libio.c \ libio_sockets.c eval.c fs_null_handlers.c TERMIOS_C_FILES = cfgetispeed.c cfgetospeed.c cfsetispeed.c cfsetospeed.c \ diff --git a/c/src/exec/libcsupport/src/base_fs.c b/c/src/exec/libcsupport/src/base_fs.c index 3ea1abd7aa..fb932b542d 100644 --- a/c/src/exec/libcsupport/src/base_fs.c +++ b/c/src/exec/libcsupport/src/base_fs.c @@ -13,7 +13,6 @@ #include #include -#include "imfs.h" #include "libio_.h" /* @@ -33,8 +32,10 @@ mode_t rtems_filesystem_umask; /* * rtems_filesystem_initialize * - * Initialize the foundation of the file system with one instantiation - * of the IMFS with a single "/dev" directory in it. + * Initialize the foundation of the file system. This is specified + * by the structure rtems_filesystem_mount_table. The usual + * configuration is a single instantiation of the IMFS or miniIMFS with + * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) diff --git a/c/src/exec/libcsupport/src/mount.c b/c/src/exec/libcsupport/src/mount.c index f5861099f6..253735b9fc 100644 --- a/c/src/exec/libcsupport/src/mount.c +++ b/c/src/exec/libcsupport/src/mount.c @@ -31,28 +31,8 @@ Chain_Control rtems_filesystem_mount_table_control; -#include "imfs.h" - -/* XXX this structure should be in an IMFS specific file */ -/* XXX this structure should use real constants */ - -rtems_filesystem_limits_and_options_t IMFS_LIMITS_AND_OPTIONS = { - 5, /* link_max */ - 6, /* max_canon */ - 7, /* max_input */ - IMFS_NAME_MAX, /* name_max */ - 255, /* path_max */ - 2, /* pipe_buf */ - 1, /* posix_async_io */ - 2, /* posix_chown_restrictions */ - 3, /* posix_no_trunc */ - 4, /* posix_prio_io */ - 5, /* posix_sync_io */ - 6 /* posix_vdisable */ -}; - /* - * XXX + * Prototypes that probably should be somewhere else. */ int search_mt_for_mount_point( diff --git a/c/src/exec/libcsupport/src/unmount.c b/c/src/exec/libcsupport/src/unmount.c index 565fa5f8d8..17f7e4baa2 100644 --- a/c/src/exec/libcsupport/src/unmount.c +++ b/c/src/exec/libcsupport/src/unmount.c @@ -26,7 +26,6 @@ #include #include -#include "imfs.h" #include "libio_.h" /* @@ -99,10 +98,6 @@ int unmount( /* * Allow the file system being mounted on to do its cleanup. - * XXX - Did I change these correctly ??? It looks like either I did - * XXX this backwards or the IMFS_unmount and IMFS_fsumount are swapped. - * XXX Add to the mt_point_node unmount to set the mt_entry back to null - * XXX I will step off in space when evaluating past the end of the node. */ if ((temp_mt_entry.mt_point_node.ops->unmount_h )( temp_loc.mt_entry ) != 0 ) { diff --git a/c/src/lib/ChangeLog b/c/src/lib/ChangeLog index db85eaf25c..d0e09e1a0e 100644 --- a/c/src/lib/ChangeLog +++ b/c/src/lib/ChangeLog @@ -1,3 +1,15 @@ + +2000-10-24 Joel Sherrill + + * libc/ioman.c: Moved to libfs. + * libc/Makefile.am: Removed ioman.c as part of moving it to libfs. + * libc/base_fs.c: Removed include of imfs.h and reworded comment + to avoid being IMFS specific. + * libc/libio.h: Removed prototype of IMFS_ops since it should + not be in this file. + * libc/mount.c: Removed IMFS specific configuration information. + * libc/unmount.c: Removed include of imfs.h and reworded comment + to avoid being IMFS specific. 2000-10-18 Chris Johns diff --git a/c/src/lib/include/rtems/libio.h b/c/src/lib/include/rtems/libio.h index 6bd626bc5a..1d4a2621d4 100644 --- a/c/src/lib/include/rtems/libio.h +++ b/c/src/lib/include/rtems/libio.h @@ -267,10 +267,6 @@ typedef struct { rtems_filesystem_readlink_t readlink_h; } rtems_filesystem_operations_table; -#define IMFS_FILE_SYSTEM IMFS_ops -extern rtems_filesystem_operations_table IMFS_ops; - - /* * Structure used to determine a location/filesystem in the tree. */ diff --git a/c/src/lib/libc/Makefile.am b/c/src/lib/libc/Makefile.am index 5861b049fa..72447d2094 100644 --- a/c/src/lib/libc/Makefile.am +++ b/c/src/lib/libc/Makefile.am @@ -11,7 +11,7 @@ ERROR_C_FILES = error.c ASSOCIATION_C_FILES = assoc.c assocnamebad.c -BASE_FS_C_FILES = base_fs.c mount.c unmount.c ioman.c libio.c \ +BASE_FS_C_FILES = base_fs.c mount.c unmount.c libio.c \ libio_sockets.c eval.c fs_null_handlers.c TERMIOS_C_FILES = cfgetispeed.c cfgetospeed.c cfsetispeed.c cfsetospeed.c \ diff --git a/c/src/lib/libc/base_fs.c b/c/src/lib/libc/base_fs.c index 3ea1abd7aa..fb932b542d 100644 --- a/c/src/lib/libc/base_fs.c +++ b/c/src/lib/libc/base_fs.c @@ -13,7 +13,6 @@ #include #include -#include "imfs.h" #include "libio_.h" /* @@ -33,8 +32,10 @@ mode_t rtems_filesystem_umask; /* * rtems_filesystem_initialize * - * Initialize the foundation of the file system with one instantiation - * of the IMFS with a single "/dev" directory in it. + * Initialize the foundation of the file system. This is specified + * by the structure rtems_filesystem_mount_table. The usual + * configuration is a single instantiation of the IMFS or miniIMFS with + * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) diff --git a/c/src/lib/libc/ioman.c b/c/src/lib/libc/ioman.c deleted file mode 100644 index e9b486937c..0000000000 --- a/c/src/lib/libc/ioman.c +++ /dev/null @@ -1,106 +0,0 @@ -/* - * This file emulates the old Classic RTEMS IO manager directives - * which register and lookup names using the in-memory filesystem. - * - * 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 -#include "libio_.h" -#include "imfs.h" - -#if defined(__linux__) -#define S_IFCHR __S_IFCHR -#endif - -/* - * rtems_io_register_name - * - * This assumes that all registered devices are character devices. - */ - -rtems_status_code rtems_io_register_name( - char *device_name, - rtems_device_major_number major, - rtems_device_minor_number minor -) -{ -#if !defined(RTEMS_UNIX) - int status; - dev_t dev; - - dev = rtems_filesystem_make_dev_t( major, minor ); - status = mknod( device_name, 0777 | S_IFCHR, dev ); - - /* this is the only error returned by the old version */ - if ( status ) - return RTEMS_TOO_MANY; - -#endif - return RTEMS_SUCCESSFUL; -} - -/* - * rtems_io_lookup_name - * - * This version is not reentrant. - * - * XXX - This is dependent upon IMFS and should not be. - * Suggest adding a filesystem routine to fill in the device_info. - */ - -rtems_status_code rtems_io_lookup_name( - const char *name, - rtems_driver_name_t **device_info -) -{ -#if !defined(RTEMS_UNIX) - IMFS_jnode_t *the_jnode; - rtems_filesystem_location_info_t loc; - static rtems_driver_name_t device; - int result; - rtems_filesystem_node_types_t node_type; - - result = rtems_filesystem_evaluate_path( name, 0x00, &loc, TRUE ); - the_jnode = loc.node_access; - - if ( !loc.ops->node_type_h ) { - rtems_filesystem_freenode( &loc ); - set_errno_and_return_minus_one( ENOTSUP ); - } - - node_type = (*loc.ops->node_type_h)( &loc ); - - if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { - *device_info = 0; - rtems_filesystem_freenode( &loc ); - return RTEMS_UNSATISFIED; - } - - device.device_name = (char *) name; - device.device_name_length = strlen( name ); - device.major = the_jnode->info.device.major; - device.minor = the_jnode->info.device.minor; - *device_info = &device; - - rtems_filesystem_freenode( &loc ); - -#endif - return RTEMS_SUCCESSFUL; -} diff --git a/c/src/lib/libc/libio.h b/c/src/lib/libc/libio.h index 6bd626bc5a..1d4a2621d4 100644 --- a/c/src/lib/libc/libio.h +++ b/c/src/lib/libc/libio.h @@ -267,10 +267,6 @@ typedef struct { rtems_filesystem_readlink_t readlink_h; } rtems_filesystem_operations_table; -#define IMFS_FILE_SYSTEM IMFS_ops -extern rtems_filesystem_operations_table IMFS_ops; - - /* * Structure used to determine a location/filesystem in the tree. */ diff --git a/c/src/lib/libc/mount.c b/c/src/lib/libc/mount.c index f5861099f6..253735b9fc 100644 --- a/c/src/lib/libc/mount.c +++ b/c/src/lib/libc/mount.c @@ -31,28 +31,8 @@ Chain_Control rtems_filesystem_mount_table_control; -#include "imfs.h" - -/* XXX this structure should be in an IMFS specific file */ -/* XXX this structure should use real constants */ - -rtems_filesystem_limits_and_options_t IMFS_LIMITS_AND_OPTIONS = { - 5, /* link_max */ - 6, /* max_canon */ - 7, /* max_input */ - IMFS_NAME_MAX, /* name_max */ - 255, /* path_max */ - 2, /* pipe_buf */ - 1, /* posix_async_io */ - 2, /* posix_chown_restrictions */ - 3, /* posix_no_trunc */ - 4, /* posix_prio_io */ - 5, /* posix_sync_io */ - 6 /* posix_vdisable */ -}; - /* - * XXX + * Prototypes that probably should be somewhere else. */ int search_mt_for_mount_point( diff --git a/c/src/lib/libc/unmount.c b/c/src/lib/libc/unmount.c index 565fa5f8d8..17f7e4baa2 100644 --- a/c/src/lib/libc/unmount.c +++ b/c/src/lib/libc/unmount.c @@ -26,7 +26,6 @@ #include #include -#include "imfs.h" #include "libio_.h" /* @@ -99,10 +98,6 @@ int unmount( /* * Allow the file system being mounted on to do its cleanup. - * XXX - Did I change these correctly ??? It looks like either I did - * XXX this backwards or the IMFS_unmount and IMFS_fsumount are swapped. - * XXX Add to the mt_point_node unmount to set the mt_entry back to null - * XXX I will step off in space when evaluating past the end of the node. */ if ((temp_mt_entry.mt_point_node.ops->unmount_h )( temp_loc.mt_entry ) != 0 ) { -- cgit v1.2.3