Changeset 937ab62c in rtems


Ignore:
Timestamp:
Jun 15, 1999, 10:16:30 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
cf1806b4
Parents:
aea6ce0b
Message:

After comments D. V. Henkel-Wallace <gumby@…>, the interface to
mount() was changed to avoid the use of a string as the options.

Files:
14 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/include/rtems/libio.h

    raea6ce0b r937ab62c  
    563563  rtems_filesystem_mount_table_entry_t **mt_entry,
    564564  rtems_filesystem_operations_table    *fs_ops,
    565   char                                 *fsoptions,
     565  rtems_filesystem_options_t            fsoptions,
    566566  char                                 *device,
    567567  char                                 *mount_point
  • c/src/exec/libcsupport/src/base_fs.c

    raea6ce0b r937ab62c  
    5656     &first_entry,
    5757     &IMFS_ops,
    58      "RW",
     58     RTEMS_FILESYSTEM_READ_WRITE,
    5959     NULL,
    6060     NULL );
  • c/src/exec/libcsupport/src/mount.c

    raea6ce0b r937ab62c  
    6161);
    6262
    63 
    64 rtems_filesystem_options_t get_file_system_options(
    65   char *fsoptions
    66 );
    67 
    6863int init_fs_mount_table( void );
    6964
     
    9489  rtems_filesystem_mount_table_entry_t **mt_entry,
    9590  rtems_filesystem_operations_table    *fs_ops,
    96   char                                 *fsoptions,
     91  rtems_filesystem_options_t            fsoptions,
    9792  char                                 *device,
    9893  char                                 *mount_point
     
    118113   */
    119114
    120   if ( fsoptions == NULL ) {
    121     errno = EINVAL;
    122     return -1;
    123   }
    124 
    125   options = get_file_system_options( fsoptions );
    126   if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ) {
     115  if ( fsoptions != RTEMS_FILESYSTEM_READ_ONLY &&
     116       fsoptions != RTEMS_FILESYSTEM_READ_WRITE ) {
    127117    errno = EINVAL;
    128118    return -1;
     
    257247  return 0;
    258248}
    259 
    260 /*
    261  *  get_file_system_options
    262  *
    263  *  This routine will determine is the text string that represents the options
    264  *  that are to be used to mount the file system are actually valid. If the
    265  *  options are valid the appropriate file system options type will be returned
    266  *  to the calling routine.
    267  */
    268 
    269 rtems_filesystem_options_t get_file_system_options(
    270   char *fsoptions
    271 )
    272 {
    273   if ( strcasecmp( "RO", fsoptions ) == 0 )
    274     return RTEMS_FILESYSTEM_READ_ONLY;
    275   if ( strcasecmp( "RW", fsoptions ) == 0 )
    276     return RTEMS_FILESYSTEM_READ_WRITE;
    277   else
    278     return RTEMS_FILESYSTEM_BAD_OPTIONS;
    279 }
    280 
    281249
    282250
  • c/src/exec/libnetworking/lib/tftpDriver.c

    raea6ce0b r937ab62c  
    235235     &entry,
    236236     &rtems_tftp_ops,
    237      "RO",
     237     RTEMS_FILESYSTEM_READ_ONLY,
    238238     NULL,
    239239     TFTP_PATHNAME_PREFIX
  • c/src/lib/include/rtems/libio.h

    raea6ce0b r937ab62c  
    563563  rtems_filesystem_mount_table_entry_t **mt_entry,
    564564  rtems_filesystem_operations_table    *fs_ops,
    565   char                                 *fsoptions,
     565  rtems_filesystem_options_t            fsoptions,
    566566  char                                 *device,
    567567  char                                 *mount_point
  • c/src/lib/libc/base_fs.c

    raea6ce0b r937ab62c  
    5656     &first_entry,
    5757     &IMFS_ops,
    58      "RW",
     58     RTEMS_FILESYSTEM_READ_WRITE,
    5959     NULL,
    6060     NULL );
  • c/src/lib/libc/libio.h

    raea6ce0b r937ab62c  
    563563  rtems_filesystem_mount_table_entry_t **mt_entry,
    564564  rtems_filesystem_operations_table    *fs_ops,
    565   char                                 *fsoptions,
     565  rtems_filesystem_options_t            fsoptions,
    566566  char                                 *device,
    567567  char                                 *mount_point
  • c/src/lib/libc/mount.c

    raea6ce0b r937ab62c  
    6161);
    6262
    63 
    64 rtems_filesystem_options_t get_file_system_options(
    65   char *fsoptions
    66 );
    67 
    6863int init_fs_mount_table( void );
    6964
     
    9489  rtems_filesystem_mount_table_entry_t **mt_entry,
    9590  rtems_filesystem_operations_table    *fs_ops,
    96   char                                 *fsoptions,
     91  rtems_filesystem_options_t            fsoptions,
    9792  char                                 *device,
    9893  char                                 *mount_point
     
    118113   */
    119114
    120   if ( fsoptions == NULL ) {
    121     errno = EINVAL;
    122     return -1;
    123   }
    124 
    125   options = get_file_system_options( fsoptions );
    126   if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ) {
     115  if ( fsoptions != RTEMS_FILESYSTEM_READ_ONLY &&
     116       fsoptions != RTEMS_FILESYSTEM_READ_WRITE ) {
    127117    errno = EINVAL;
    128118    return -1;
     
    257247  return 0;
    258248}
    259 
    260 /*
    261  *  get_file_system_options
    262  *
    263  *  This routine will determine is the text string that represents the options
    264  *  that are to be used to mount the file system are actually valid. If the
    265  *  options are valid the appropriate file system options type will be returned
    266  *  to the calling routine.
    267  */
    268 
    269 rtems_filesystem_options_t get_file_system_options(
    270   char *fsoptions
    271 )
    272 {
    273   if ( strcasecmp( "RO", fsoptions ) == 0 )
    274     return RTEMS_FILESYSTEM_READ_ONLY;
    275   if ( strcasecmp( "RW", fsoptions ) == 0 )
    276     return RTEMS_FILESYSTEM_READ_WRITE;
    277   else
    278     return RTEMS_FILESYSTEM_BAD_OPTIONS;
    279 }
    280 
    281249
    282250
  • c/src/lib/libnetworking/lib/tftpDriver.c

    raea6ce0b r937ab62c  
    235235     &entry,
    236236     &rtems_tftp_ops,
    237      "RO",
     237     RTEMS_FILESYSTEM_READ_ONLY,
    238238     NULL,
    239239     TFTP_PATHNAME_PREFIX
  • c/src/libnetworking/lib/tftpDriver.c

    raea6ce0b r937ab62c  
    235235     &entry,
    236236     &rtems_tftp_ops,
    237      "RO",
     237     RTEMS_FILESYSTEM_READ_ONLY,
    238238     NULL,
    239239     TFTP_PATHNAME_PREFIX
  • cpukit/libcsupport/include/rtems/libio.h

    raea6ce0b r937ab62c  
    563563  rtems_filesystem_mount_table_entry_t **mt_entry,
    564564  rtems_filesystem_operations_table    *fs_ops,
    565   char                                 *fsoptions,
     565  rtems_filesystem_options_t            fsoptions,
    566566  char                                 *device,
    567567  char                                 *mount_point
  • cpukit/libcsupport/src/base_fs.c

    raea6ce0b r937ab62c  
    5656     &first_entry,
    5757     &IMFS_ops,
    58      "RW",
     58     RTEMS_FILESYSTEM_READ_WRITE,
    5959     NULL,
    6060     NULL );
  • cpukit/libcsupport/src/mount.c

    raea6ce0b r937ab62c  
    6161);
    6262
    63 
    64 rtems_filesystem_options_t get_file_system_options(
    65   char *fsoptions
    66 );
    67 
    6863int init_fs_mount_table( void );
    6964
     
    9489  rtems_filesystem_mount_table_entry_t **mt_entry,
    9590  rtems_filesystem_operations_table    *fs_ops,
    96   char                                 *fsoptions,
     91  rtems_filesystem_options_t            fsoptions,
    9792  char                                 *device,
    9893  char                                 *mount_point
     
    118113   */
    119114
    120   if ( fsoptions == NULL ) {
    121     errno = EINVAL;
    122     return -1;
    123   }
    124 
    125   options = get_file_system_options( fsoptions );
    126   if ( options == RTEMS_FILESYSTEM_BAD_OPTIONS ) {
     115  if ( fsoptions != RTEMS_FILESYSTEM_READ_ONLY &&
     116       fsoptions != RTEMS_FILESYSTEM_READ_WRITE ) {
    127117    errno = EINVAL;
    128118    return -1;
     
    257247  return 0;
    258248}
    259 
    260 /*
    261  *  get_file_system_options
    262  *
    263  *  This routine will determine is the text string that represents the options
    264  *  that are to be used to mount the file system are actually valid. If the
    265  *  options are valid the appropriate file system options type will be returned
    266  *  to the calling routine.
    267  */
    268 
    269 rtems_filesystem_options_t get_file_system_options(
    270   char *fsoptions
    271 )
    272 {
    273   if ( strcasecmp( "RO", fsoptions ) == 0 )
    274     return RTEMS_FILESYSTEM_READ_ONLY;
    275   if ( strcasecmp( "RW", fsoptions ) == 0 )
    276     return RTEMS_FILESYSTEM_READ_WRITE;
    277   else
    278     return RTEMS_FILESYSTEM_BAD_OPTIONS;
    279 }
    280 
    281249
    282250
  • cpukit/libnetworking/lib/tftpDriver.c

    raea6ce0b r937ab62c  
    235235     &entry,
    236236     &rtems_tftp_ops,
    237      "RO",
     237     RTEMS_FILESYSTEM_READ_ONLY,
    238238     NULL,
    239239     TFTP_PATHNAME_PREFIX
Note: See TracChangeset for help on using the changeset viewer.