diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-06-15 22:16:30 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-06-15 22:16:30 +0000 |
commit | 937ab62c3070f76e26c14d25d705d9167136f26c (patch) | |
tree | d5532e9be310b60248b83b91548a511c781204d3 /cpukit/libcsupport/src | |
parent | Regenerated. (diff) | |
download | rtems-937ab62c3070f76e26c14d25d705d9167136f26c.tar.bz2 |
After comments D. V. Henkel-Wallace <gumby@zembu.com>, the interface to
mount() was changed to avoid the use of a string as the options.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libcsupport/src/base_fs.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/mount.c | 38 |
2 files changed, 4 insertions, 36 deletions
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 |