mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-22 15:27:32 +00:00
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.
This commit is contained in:
@@ -562,7 +562,7 @@ int unmount(
|
|||||||
int mount(
|
int mount(
|
||||||
rtems_filesystem_mount_table_entry_t **mt_entry,
|
rtems_filesystem_mount_table_entry_t **mt_entry,
|
||||||
rtems_filesystem_operations_table *fs_ops,
|
rtems_filesystem_operations_table *fs_ops,
|
||||||
char *fsoptions,
|
rtems_filesystem_options_t fsoptions,
|
||||||
char *device,
|
char *device,
|
||||||
char *mount_point
|
char *mount_point
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ void rtems_filesystem_initialize( void )
|
|||||||
status = mount(
|
status = mount(
|
||||||
&first_entry,
|
&first_entry,
|
||||||
&IMFS_ops,
|
&IMFS_ops,
|
||||||
"RW",
|
RTEMS_FILESYSTEM_READ_WRITE,
|
||||||
NULL,
|
NULL,
|
||||||
NULL );
|
NULL );
|
||||||
if( status == -1 ){
|
if( status == -1 ){
|
||||||
|
|||||||
@@ -60,11 +60,6 @@ int search_mt_for_mount_point(
|
|||||||
rtems_filesystem_location_info_t *location_of_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 );
|
int init_fs_mount_table( void );
|
||||||
|
|
||||||
|
|
||||||
@@ -93,7 +88,7 @@ int init_fs_mount_table( void );
|
|||||||
int mount(
|
int mount(
|
||||||
rtems_filesystem_mount_table_entry_t **mt_entry,
|
rtems_filesystem_mount_table_entry_t **mt_entry,
|
||||||
rtems_filesystem_operations_table *fs_ops,
|
rtems_filesystem_operations_table *fs_ops,
|
||||||
char *fsoptions,
|
rtems_filesystem_options_t fsoptions,
|
||||||
char *device,
|
char *device,
|
||||||
char *mount_point
|
char *mount_point
|
||||||
)
|
)
|
||||||
@@ -117,13 +112,8 @@ int mount(
|
|||||||
* Are the file system options valid?
|
* Are the file system options valid?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( fsoptions == NULL ) {
|
if ( fsoptions != RTEMS_FILESYSTEM_READ_ONLY &&
|
||||||
errno = EINVAL;
|
fsoptions != RTEMS_FILESYSTEM_READ_WRITE ) {
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
options = get_file_system_options( fsoptions );
|
|
||||||
if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ) {
|
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -257,28 +247,6 @@ int init_fs_mount_table()
|
|||||||
return 0;
|
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
|
* search_mt_for_mount_point
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ int rtems_bsdnet_initialize_tftp_filesystem ()
|
|||||||
status = mount(
|
status = mount(
|
||||||
&entry,
|
&entry,
|
||||||
&rtems_tftp_ops,
|
&rtems_tftp_ops,
|
||||||
"RO",
|
RTEMS_FILESYSTEM_READ_ONLY,
|
||||||
NULL,
|
NULL,
|
||||||
TFTP_PATHNAME_PREFIX
|
TFTP_PATHNAME_PREFIX
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -562,7 +562,7 @@ int unmount(
|
|||||||
int mount(
|
int mount(
|
||||||
rtems_filesystem_mount_table_entry_t **mt_entry,
|
rtems_filesystem_mount_table_entry_t **mt_entry,
|
||||||
rtems_filesystem_operations_table *fs_ops,
|
rtems_filesystem_operations_table *fs_ops,
|
||||||
char *fsoptions,
|
rtems_filesystem_options_t fsoptions,
|
||||||
char *device,
|
char *device,
|
||||||
char *mount_point
|
char *mount_point
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ void rtems_filesystem_initialize( void )
|
|||||||
status = mount(
|
status = mount(
|
||||||
&first_entry,
|
&first_entry,
|
||||||
&IMFS_ops,
|
&IMFS_ops,
|
||||||
"RW",
|
RTEMS_FILESYSTEM_READ_WRITE,
|
||||||
NULL,
|
NULL,
|
||||||
NULL );
|
NULL );
|
||||||
if( status == -1 ){
|
if( status == -1 ){
|
||||||
|
|||||||
@@ -562,7 +562,7 @@ int unmount(
|
|||||||
int mount(
|
int mount(
|
||||||
rtems_filesystem_mount_table_entry_t **mt_entry,
|
rtems_filesystem_mount_table_entry_t **mt_entry,
|
||||||
rtems_filesystem_operations_table *fs_ops,
|
rtems_filesystem_operations_table *fs_ops,
|
||||||
char *fsoptions,
|
rtems_filesystem_options_t fsoptions,
|
||||||
char *device,
|
char *device,
|
||||||
char *mount_point
|
char *mount_point
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -60,11 +60,6 @@ int search_mt_for_mount_point(
|
|||||||
rtems_filesystem_location_info_t *location_of_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 );
|
int init_fs_mount_table( void );
|
||||||
|
|
||||||
|
|
||||||
@@ -93,7 +88,7 @@ int init_fs_mount_table( void );
|
|||||||
int mount(
|
int mount(
|
||||||
rtems_filesystem_mount_table_entry_t **mt_entry,
|
rtems_filesystem_mount_table_entry_t **mt_entry,
|
||||||
rtems_filesystem_operations_table *fs_ops,
|
rtems_filesystem_operations_table *fs_ops,
|
||||||
char *fsoptions,
|
rtems_filesystem_options_t fsoptions,
|
||||||
char *device,
|
char *device,
|
||||||
char *mount_point
|
char *mount_point
|
||||||
)
|
)
|
||||||
@@ -117,13 +112,8 @@ int mount(
|
|||||||
* Are the file system options valid?
|
* Are the file system options valid?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( fsoptions == NULL ) {
|
if ( fsoptions != RTEMS_FILESYSTEM_READ_ONLY &&
|
||||||
errno = EINVAL;
|
fsoptions != RTEMS_FILESYSTEM_READ_WRITE ) {
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
options = get_file_system_options( fsoptions );
|
|
||||||
if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ) {
|
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -257,28 +247,6 @@ int init_fs_mount_table()
|
|||||||
return 0;
|
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
|
* search_mt_for_mount_point
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ int rtems_bsdnet_initialize_tftp_filesystem ()
|
|||||||
status = mount(
|
status = mount(
|
||||||
&entry,
|
&entry,
|
||||||
&rtems_tftp_ops,
|
&rtems_tftp_ops,
|
||||||
"RO",
|
RTEMS_FILESYSTEM_READ_ONLY,
|
||||||
NULL,
|
NULL,
|
||||||
TFTP_PATHNAME_PREFIX
|
TFTP_PATHNAME_PREFIX
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ int rtems_bsdnet_initialize_tftp_filesystem ()
|
|||||||
status = mount(
|
status = mount(
|
||||||
&entry,
|
&entry,
|
||||||
&rtems_tftp_ops,
|
&rtems_tftp_ops,
|
||||||
"RO",
|
RTEMS_FILESYSTEM_READ_ONLY,
|
||||||
NULL,
|
NULL,
|
||||||
TFTP_PATHNAME_PREFIX
|
TFTP_PATHNAME_PREFIX
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -562,7 +562,7 @@ int unmount(
|
|||||||
int mount(
|
int mount(
|
||||||
rtems_filesystem_mount_table_entry_t **mt_entry,
|
rtems_filesystem_mount_table_entry_t **mt_entry,
|
||||||
rtems_filesystem_operations_table *fs_ops,
|
rtems_filesystem_operations_table *fs_ops,
|
||||||
char *fsoptions,
|
rtems_filesystem_options_t fsoptions,
|
||||||
char *device,
|
char *device,
|
||||||
char *mount_point
|
char *mount_point
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ void rtems_filesystem_initialize( void )
|
|||||||
status = mount(
|
status = mount(
|
||||||
&first_entry,
|
&first_entry,
|
||||||
&IMFS_ops,
|
&IMFS_ops,
|
||||||
"RW",
|
RTEMS_FILESYSTEM_READ_WRITE,
|
||||||
NULL,
|
NULL,
|
||||||
NULL );
|
NULL );
|
||||||
if( status == -1 ){
|
if( status == -1 ){
|
||||||
|
|||||||
@@ -60,11 +60,6 @@ int search_mt_for_mount_point(
|
|||||||
rtems_filesystem_location_info_t *location_of_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 );
|
int init_fs_mount_table( void );
|
||||||
|
|
||||||
|
|
||||||
@@ -93,7 +88,7 @@ int init_fs_mount_table( void );
|
|||||||
int mount(
|
int mount(
|
||||||
rtems_filesystem_mount_table_entry_t **mt_entry,
|
rtems_filesystem_mount_table_entry_t **mt_entry,
|
||||||
rtems_filesystem_operations_table *fs_ops,
|
rtems_filesystem_operations_table *fs_ops,
|
||||||
char *fsoptions,
|
rtems_filesystem_options_t fsoptions,
|
||||||
char *device,
|
char *device,
|
||||||
char *mount_point
|
char *mount_point
|
||||||
)
|
)
|
||||||
@@ -117,13 +112,8 @@ int mount(
|
|||||||
* Are the file system options valid?
|
* Are the file system options valid?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( fsoptions == NULL ) {
|
if ( fsoptions != RTEMS_FILESYSTEM_READ_ONLY &&
|
||||||
errno = EINVAL;
|
fsoptions != RTEMS_FILESYSTEM_READ_WRITE ) {
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
options = get_file_system_options( fsoptions );
|
|
||||||
if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ) {
|
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -257,28 +247,6 @@ int init_fs_mount_table()
|
|||||||
return 0;
|
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
|
* search_mt_for_mount_point
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ int rtems_bsdnet_initialize_tftp_filesystem ()
|
|||||||
status = mount(
|
status = mount(
|
||||||
&entry,
|
&entry,
|
||||||
&rtems_tftp_ops,
|
&rtems_tftp_ops,
|
||||||
"RO",
|
RTEMS_FILESYSTEM_READ_ONLY,
|
||||||
NULL,
|
NULL,
|
||||||
TFTP_PATHNAME_PREFIX
|
TFTP_PATHNAME_PREFIX
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user