Changeset bde7e18e in rtems


Ignore:
Timestamp:
Nov 20, 2000, 1:29:21 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
51252af
Parents:
2e3ce06
Message:

2000-11-20 Dmitry Kargapolov <dk@…>

  • libc/mount.c: Make sure there is space allocated for a device name in the mount table entry.
Files:
4 edited

Legend:

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

    r2e3ce06 rbde7e18e  
    7575  rtems_filesystem_mount_table_entry_t *temp_mt_entry;
    7676  rtems_filesystem_location_info_t     *loc_to_free = NULL;
     77  size_t size;
    7778
    7879/* XXX add code to check for required operations */
     
    101102   */
    102103
    103    temp_mt_entry = malloc( sizeof(rtems_filesystem_mount_table_entry_t) );
     104   size = sizeof(rtems_filesystem_mount_table_entry_t);
     105   if ( device )
     106     size += strlen( device ) + 1;
     107   temp_mt_entry = malloc( size );
    104108
    105109   if ( !temp_mt_entry ) {
     
    110114   temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
    111115   temp_mt_entry->options = options;
    112    if ( device )
     116   if ( device ) {
     117     temp_mt_entry->dev =
     118       (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
    113119     strcpy( temp_mt_entry->dev, device );
    114    else
     120   } else
    115121     temp_mt_entry->dev = 0;
    116122
  • c/src/lib/ChangeLog

    r2e3ce06 rbde7e18e  
     1
     22000-11-20       Dmitry Kargapolov <dk@gentex.ru>
     3
     4        * libc/mount.c: Make sure there is space allocated for a device name
     5        in the mount table entry.
     6
     72000-11-17      Jennifer Averret <jennifer@OARcorp.com>
     8
     9        * libc/mount.c (search_mt_for_mount_point): Deleted routine.
     10        * libc/mount.c (Is_node_fs_root): Replacement for above that
     11        accounts for the imaginary root node being returned by the
     12        filesystem evaluation routine.
     13        * libc/unmount.c (unmount): Account for imaginary root node
     14        being returned and improved variable names to clarify code.
     15        * libc/unmount.c (file_systems_below_this_mountpoint):  Body of
     16        routine replaced to account for imaginary root node being returned.
    117
    2182000-11-10      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
  • c/src/lib/libc/mount.c

    r2e3ce06 rbde7e18e  
    7575  rtems_filesystem_mount_table_entry_t *temp_mt_entry;
    7676  rtems_filesystem_location_info_t     *loc_to_free = NULL;
     77  size_t size;
    7778
    7879/* XXX add code to check for required operations */
     
    101102   */
    102103
    103    temp_mt_entry = malloc( sizeof(rtems_filesystem_mount_table_entry_t) );
     104   size = sizeof(rtems_filesystem_mount_table_entry_t);
     105   if ( device )
     106     size += strlen( device ) + 1;
     107   temp_mt_entry = malloc( size );
    104108
    105109   if ( !temp_mt_entry ) {
     
    110114   temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
    111115   temp_mt_entry->options = options;
    112    if ( device )
     116   if ( device ) {
     117     temp_mt_entry->dev =
     118       (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
    113119     strcpy( temp_mt_entry->dev, device );
    114    else
     120   } else
    115121     temp_mt_entry->dev = 0;
    116122
  • cpukit/libcsupport/src/mount.c

    r2e3ce06 rbde7e18e  
    7575  rtems_filesystem_mount_table_entry_t *temp_mt_entry;
    7676  rtems_filesystem_location_info_t     *loc_to_free = NULL;
     77  size_t size;
    7778
    7879/* XXX add code to check for required operations */
     
    101102   */
    102103
    103    temp_mt_entry = malloc( sizeof(rtems_filesystem_mount_table_entry_t) );
     104   size = sizeof(rtems_filesystem_mount_table_entry_t);
     105   if ( device )
     106     size += strlen( device ) + 1;
     107   temp_mt_entry = malloc( size );
    104108
    105109   if ( !temp_mt_entry ) {
     
    110114   temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
    111115   temp_mt_entry->options = options;
    112    if ( device )
     116   if ( device ) {
     117     temp_mt_entry->dev =
     118       (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
    113119     strcpy( temp_mt_entry->dev, device );
    114    else
     120   } else
    115121     temp_mt_entry->dev = 0;
    116122
Note: See TracChangeset for help on using the changeset viewer.