Changeset 063e4950 in rtems


Ignore:
Timestamp:
11/02/99 16:27:05 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
5f2566b
Parents:
a504ced3
Message:

Added support for configuring base filesystem. First attempt at
a full mount table at initialization. This is the wrong place
to mount filesystems 2-n since no device drivers are initialized
yet.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/base_fs.c

    ra504ced3 r063e4950  
    4242{
    4343#if !defined(RTEMS_UNIX)
     44#if 0
     45  int                                   i;
     46#endif
    4447  int                                   status;
    45   rtems_filesystem_mount_table_entry_t *first_entry;
    46 
     48  rtems_filesystem_mount_table_entry_t *entry;
     49  rtems_filesystem_mount_table_t       *mt;
     50 
    4751  /*
    4852   *  Set the default umask to "022".
     
    5559  /*
    5660   *  mount the first filesystem.
    57    *
    58    *  NOTE: XXX This really needs to be read from a table of filesystems
    59    *        to mount initially and the miniIMFS needs to be shaken out.
    6061   */
    6162
    62   status = mount(
    63      &first_entry,
    64      &IMFS_ops,
    65      RTEMS_FILESYSTEM_READ_WRITE,
    66      NULL,
    67      NULL );
    68   if( status == -1 ){
     63  if ( rtems_filesystem_mount_table_size == 0 )
     64    rtems_fatal_error_occurred( 0xABCD0001 );
     65
     66  mt = &rtems_filesystem_mount_table[0];
     67
     68  status = mount(
     69     &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
     70
     71  if ( status == -1 )
    6972    rtems_fatal_error_occurred( 0xABCD0002 );
    70   }
    7173
    7274  rtems_filesystem_link_counts = 0;
    73 
    74   rtems_filesystem_root    = first_entry->mt_fs_root;
    75 
    76   rtems_filesystem_current = rtems_filesystem_root;
     75  rtems_filesystem_root        = entry->mt_fs_root;
     76  rtems_filesystem_current     = rtems_filesystem_root;
    7777
    7878  /*
     
    8787  if ( status != 0 )
    8888    rtems_fatal_error_occurred( 0xABCD0003 );
     89
     90  /*
     91   *  This code if if'ed 0 out because you can't mount another
     92   *  filesystem properly until the mount point it will be
     93   *  mounted onto is created.  Moreover, if it is going to
     94   *  use a device, then it is REALLY unfair to attempt this
     95   *  before device drivers are initialized.
     96   */
     97
     98#if 0
     99  /*
     100   *  Now if there are other filesystems to mount, go for it.
     101   */
     102
     103  for ( i=1 ; i < rtems_filesystem_mount_table_size ; i++ ) {
     104    mt = &rtems_filesystem_mount_table[0];
     105
     106    status = mount(
     107       &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
     108
     109    if ( status == -1 )
     110      rtems_fatal_error_occurred( 0xABCD0003 );
     111  }
     112#endif
    89113#endif
    90114}
  • c/src/lib/libc/base_fs.c

    ra504ced3 r063e4950  
    4242{
    4343#if !defined(RTEMS_UNIX)
     44#if 0
     45  int                                   i;
     46#endif
    4447  int                                   status;
    45   rtems_filesystem_mount_table_entry_t *first_entry;
    46 
     48  rtems_filesystem_mount_table_entry_t *entry;
     49  rtems_filesystem_mount_table_t       *mt;
     50 
    4751  /*
    4852   *  Set the default umask to "022".
     
    5559  /*
    5660   *  mount the first filesystem.
    57    *
    58    *  NOTE: XXX This really needs to be read from a table of filesystems
    59    *        to mount initially and the miniIMFS needs to be shaken out.
    6061   */
    6162
    62   status = mount(
    63      &first_entry,
    64      &IMFS_ops,
    65      RTEMS_FILESYSTEM_READ_WRITE,
    66      NULL,
    67      NULL );
    68   if( status == -1 ){
     63  if ( rtems_filesystem_mount_table_size == 0 )
     64    rtems_fatal_error_occurred( 0xABCD0001 );
     65
     66  mt = &rtems_filesystem_mount_table[0];
     67
     68  status = mount(
     69     &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
     70
     71  if ( status == -1 )
    6972    rtems_fatal_error_occurred( 0xABCD0002 );
    70   }
    7173
    7274  rtems_filesystem_link_counts = 0;
    73 
    74   rtems_filesystem_root    = first_entry->mt_fs_root;
    75 
    76   rtems_filesystem_current = rtems_filesystem_root;
     75  rtems_filesystem_root        = entry->mt_fs_root;
     76  rtems_filesystem_current     = rtems_filesystem_root;
    7777
    7878  /*
     
    8787  if ( status != 0 )
    8888    rtems_fatal_error_occurred( 0xABCD0003 );
     89
     90  /*
     91   *  This code if if'ed 0 out because you can't mount another
     92   *  filesystem properly until the mount point it will be
     93   *  mounted onto is created.  Moreover, if it is going to
     94   *  use a device, then it is REALLY unfair to attempt this
     95   *  before device drivers are initialized.
     96   */
     97
     98#if 0
     99  /*
     100   *  Now if there are other filesystems to mount, go for it.
     101   */
     102
     103  for ( i=1 ; i < rtems_filesystem_mount_table_size ; i++ ) {
     104    mt = &rtems_filesystem_mount_table[0];
     105
     106    status = mount(
     107       &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
     108
     109    if ( status == -1 )
     110      rtems_fatal_error_occurred( 0xABCD0003 );
     111  }
     112#endif
    89113#endif
    90114}
  • cpukit/libcsupport/src/base_fs.c

    ra504ced3 r063e4950  
    4242{
    4343#if !defined(RTEMS_UNIX)
     44#if 0
     45  int                                   i;
     46#endif
    4447  int                                   status;
    45   rtems_filesystem_mount_table_entry_t *first_entry;
    46 
     48  rtems_filesystem_mount_table_entry_t *entry;
     49  rtems_filesystem_mount_table_t       *mt;
     50 
    4751  /*
    4852   *  Set the default umask to "022".
     
    5559  /*
    5660   *  mount the first filesystem.
    57    *
    58    *  NOTE: XXX This really needs to be read from a table of filesystems
    59    *        to mount initially and the miniIMFS needs to be shaken out.
    6061   */
    6162
    62   status = mount(
    63      &first_entry,
    64      &IMFS_ops,
    65      RTEMS_FILESYSTEM_READ_WRITE,
    66      NULL,
    67      NULL );
    68   if( status == -1 ){
     63  if ( rtems_filesystem_mount_table_size == 0 )
     64    rtems_fatal_error_occurred( 0xABCD0001 );
     65
     66  mt = &rtems_filesystem_mount_table[0];
     67
     68  status = mount(
     69     &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
     70
     71  if ( status == -1 )
    6972    rtems_fatal_error_occurred( 0xABCD0002 );
    70   }
    7173
    7274  rtems_filesystem_link_counts = 0;
    73 
    74   rtems_filesystem_root    = first_entry->mt_fs_root;
    75 
    76   rtems_filesystem_current = rtems_filesystem_root;
     75  rtems_filesystem_root        = entry->mt_fs_root;
     76  rtems_filesystem_current     = rtems_filesystem_root;
    7777
    7878  /*
     
    8787  if ( status != 0 )
    8888    rtems_fatal_error_occurred( 0xABCD0003 );
     89
     90  /*
     91   *  This code if if'ed 0 out because you can't mount another
     92   *  filesystem properly until the mount point it will be
     93   *  mounted onto is created.  Moreover, if it is going to
     94   *  use a device, then it is REALLY unfair to attempt this
     95   *  before device drivers are initialized.
     96   */
     97
     98#if 0
     99  /*
     100   *  Now if there are other filesystems to mount, go for it.
     101   */
     102
     103  for ( i=1 ; i < rtems_filesystem_mount_table_size ; i++ ) {
     104    mt = &rtems_filesystem_mount_table[0];
     105
     106    status = mount(
     107       &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
     108
     109    if ( status == -1 )
     110      rtems_fatal_error_occurred( 0xABCD0003 );
     111  }
     112#endif
    89113#endif
    90114}
Note: See TracChangeset for help on using the changeset viewer.