Changeset 4b0d1ab in rtems for cpukit/libcsupport/src/mount.c
- Timestamp:
- Nov 17, 2000, 6:42:02 PM (20 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 13e47e2e
- Parents:
- ee6d205
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libcsupport/src/mount.c
ree6d205 r4b0d1ab 36 36 */ 37 37 38 int search_mt_for_mount_point( 39 rtems_filesystem_location_info_t *location_of_mount_point 38 int init_fs_mount_table( void ); 39 static int Is_node_fs_root( 40 rtems_filesystem_location_info_t *loc 40 41 ); 41 42 int init_fs_mount_table( void );43 42 44 43 … … 141 140 */ 142 141 143 if ( search_mt_for_mount_point( &loc ) == FOUND ){142 if ( Is_node_fs_root( &loc ) ){ 144 143 errno = EBUSY; 145 144 goto cleanup_and_bail; … … 233 232 } 234 233 235 236 /* 237 * search_mt_for_mount_point 234 /* 235 * Is_node_fs_root 238 236 * 239 237 * This routine will run through the entries that currently exist in the 240 238 * mount table chain. For each entry in the mount table chain it will 241 * compare the mount tables mt_point_node to the node describing the selected 242 * mount point.. If any of the mount table file system mount point nodes 243 * match the new file system selected mount point node, we are attempting 244 * to mount the new file system onto a node that already has a file system 245 * mounted to it. This is not a permitted operation. 246 */ 247 248 int search_mt_for_mount_point( 249 rtems_filesystem_location_info_t *location_of_mount_point 239 * compare the mount tables root node to the node describing the selected 240 * mount point. If any match is found true is returned else false is 241 * returned. 242 * 243 */ 244 245 static int Is_node_fs_root( 246 rtems_filesystem_location_info_t *loc 250 247 ) 251 248 { … … 253 250 rtems_filesystem_mount_table_entry_t *the_mount_entry; 254 251 252 /* 253 * For each mount table entry 254 */ 255 255 256 for ( the_node = rtems_filesystem_mount_table_control.first; 256 257 !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); 257 258 the_node = the_node->next ) { 258 259 259 the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; 260 if ( the_mount_entry->mt_point_node.node_access == 261 location_of_mount_point->node_access ) 262 return FOUND; 263 } 264 return NOT_FOUND; 260 if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 261 return TRUE; 262 } 263 return FALSE; 265 264 } 266
Note: See TracChangeset
for help on using the changeset viewer.