Changeset 204 for trunk/kernel/vfs/devfs.c
- Timestamp:
- Jul 17, 2017, 8:42:59 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/vfs/devfs.c
r188 r204 53 53 ///////////////////////////////////////////// 54 54 void devfs_ctx_init( devfs_ctx_t * devfs_ctx, 55 xptr_t devfs_ root_inode_xp,55 xptr_t devfs_dev_inode_xp, 56 56 xptr_t devfs_external_inode_xp ) 57 57 { 58 devfs_ctx-> root_inode_xp = devfs_root_inode_xp;58 devfs_ctx->dev_inode_xp = devfs_dev_inode_xp; 59 59 devfs_ctx->external_inode_xp = devfs_external_inode_xp; 60 60 … … 74 74 /////////////////////////////////////////////////// 75 75 void devfs_global_init( xptr_t parent_inode_xp, 76 xptr_t * devfs_ root_inode_xp,76 xptr_t * devfs_dev_inode_xp, 77 77 xptr_t * devfs_external_inode_xp ) 78 78 { … … 86 86 "dev", 87 87 NULL, 88 devfs_ root_inode_xp );88 devfs_dev_inode_xp ); 89 89 90 90 nolock_assert( (error == 0) , __FUNCTION__ , "cannot create <dev>\n" ); … … 94 94 INODE_TYPE_DIR, 95 95 FS_TYPE_DEVFS, 96 *devfs_ root_inode_xp,97 " dev",96 *devfs_dev_inode_xp, 97 "external", 98 98 NULL, 99 99 devfs_external_inode_xp ); … … 102 102 } 103 103 104 ////////////////////////////////////////////////// 105 void devfs_local_init( xptr_t devfs_root_inode_xp, 106 xptr_t devfs_external_inode_xp ) 104 /////////////////////////////////////////////////// 105 void devfs_local_init( xptr_t devfs_dev_inode_xp, 106 xptr_t devfs_external_inode_xp, 107 xptr_t * devfs_internal_inode_xp ) 107 108 { 108 109 char node_name[16]; … … 110 111 cxy_t chdev_cxy; 111 112 xptr_t inode_xp; 112 xptr_t internal_inode_xp;113 113 uint32_t channel; 114 114 … … 118 118 INODE_TYPE_DIR, 119 119 FS_TYPE_DEVFS, 120 devfs_ root_inode_xp,120 devfs_dev_inode_xp, 121 121 node_name, 122 122 NULL, 123 &internal_inode_xp );124 125 // create ICUchdev inode126 chdev_xp = chdev_dir. icu[local_cxy];127 if( chdev_xp != XPTR_NULL) 123 devfs_internal_inode_xp ); 124 125 // create MMC chdev inode 126 chdev_xp = chdev_dir.mmc[local_cxy]; 127 if( chdev_xp != XPTR_NULL) 128 128 { 129 129 vfs_add_child_in_parent( local_cxy, 130 130 INODE_TYPE_DEV, 131 131 FS_TYPE_DEVFS, 132 internal_inode_xp, 133 "icu", 134 GET_PTR( chdev_xp ), 135 &inode_xp ); 136 } 137 138 // create MMC chdev inode 139 chdev_xp = chdev_dir.mmc[local_cxy]; 140 if( chdev_xp != XPTR_NULL) 141 { 142 vfs_add_child_in_parent( local_cxy, 143 INODE_TYPE_DEV, 144 FS_TYPE_DEVFS, 145 internal_inode_xp, 132 *devfs_internal_inode_xp, 146 133 "mmc", 147 134 GET_PTR( chdev_xp ), … … 159 146 INODE_TYPE_DEV, 160 147 FS_TYPE_DEVFS, 161 internal_inode_xp,148 *devfs_internal_inode_xp, 162 149 node_name, 163 150 GET_PTR( chdev_xp ),
Note: See TracChangeset
for help on using the changeset viewer.