2000-10-24 Joel Sherrill <joel@OARcorp.com>

* 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.
This commit is contained in:
Joel Sherrill
2000-10-25 16:56:11 +00:00
parent c801aba17b
commit 7b0001f795
17 changed files with 29 additions and 211 deletions

View File

@@ -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.
*/

View File

@@ -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 \

View File

@@ -13,7 +13,6 @@
#include <rtems.h>
#include <rtems/libio.h>
#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 )

View File

@@ -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(

View File

@@ -26,7 +26,6 @@
#include <string.h>
#include <assert.h>
#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 ) {

View File

@@ -1,3 +1,15 @@
2000-10-24 Joel Sherrill <joel@OARcorp.com>
* 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 <ccj@acm.org>

View File

@@ -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.
*/

View File

@@ -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 \

View File

@@ -13,7 +13,6 @@
#include <rtems.h>
#include <rtems/libio.h>
#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 )

View File

@@ -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 <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <assert.h>
#include <rtems.h>
#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;
}

View File

@@ -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.
*/

View File

@@ -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(

View File

@@ -26,7 +26,6 @@
#include <string.h>
#include <assert.h>
#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 ) {

View File

@@ -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.
*/

View File

@@ -13,7 +13,6 @@
#include <rtems.h>
#include <rtems/libio.h>
#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 )

View File

@@ -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(

View File

@@ -26,7 +26,6 @@
#include <string.h>
#include <assert.h>
#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 ) {