From 937ab62c3070f76e26c14d25d705d9167136f26c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 15 Jun 1999 22:16:30 +0000 Subject: After comments D. V. Henkel-Wallace , the interface to mount() was changed to avoid the use of a string as the options. --- cpukit/libcsupport/src/base_fs.c | 2 +- cpukit/libcsupport/src/mount.c | 38 +++----------------------------------- 2 files changed, 4 insertions(+), 36 deletions(-) (limited to 'cpukit/libcsupport/src') diff --git a/cpukit/libcsupport/src/base_fs.c b/cpukit/libcsupport/src/base_fs.c index a3bb196482..e5f53c042b 100644 --- a/cpukit/libcsupport/src/base_fs.c +++ b/cpukit/libcsupport/src/base_fs.c @@ -55,7 +55,7 @@ void rtems_filesystem_initialize( void ) status = mount( &first_entry, &IMFS_ops, - "RW", + RTEMS_FILESYSTEM_READ_WRITE, NULL, NULL ); if( status == -1 ){ diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c index c4b62c3a28..ed15881494 100644 --- a/cpukit/libcsupport/src/mount.c +++ b/cpukit/libcsupport/src/mount.c @@ -60,11 +60,6 @@ int search_mt_for_mount_point( rtems_filesystem_location_info_t *location_of_mount_point ); - -rtems_filesystem_options_t get_file_system_options( - char *fsoptions -); - int init_fs_mount_table( void ); @@ -93,7 +88,7 @@ int init_fs_mount_table( void ); int mount( rtems_filesystem_mount_table_entry_t **mt_entry, rtems_filesystem_operations_table *fs_ops, - char *fsoptions, + rtems_filesystem_options_t fsoptions, char *device, char *mount_point ) @@ -117,13 +112,8 @@ int mount( * Are the file system options valid? */ - if ( fsoptions == NULL ) { - errno = EINVAL; - return -1; - } - - options = get_file_system_options( fsoptions ); - if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ) { + if ( fsoptions != RTEMS_FILESYSTEM_READ_ONLY && + fsoptions != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; return -1; } @@ -257,28 +247,6 @@ int init_fs_mount_table() return 0; } -/* - * get_file_system_options - * - * This routine will determine is the text string that represents the options - * that are to be used to mount the file system are actually valid. If the - * options are valid the appropriate file system options type will be returned - * to the calling routine. - */ - -rtems_filesystem_options_t get_file_system_options( - char *fsoptions -) -{ - if ( strcasecmp( "RO", fsoptions ) == 0 ) - return RTEMS_FILESYSTEM_READ_ONLY; - if ( strcasecmp( "RW", fsoptions ) == 0 ) - return RTEMS_FILESYSTEM_READ_WRITE; - else - return RTEMS_FILESYSTEM_BAD_OPTIONS; -} - - /* * search_mt_for_mount_point -- cgit v1.2.3