Changeset 673 for trunk/kernel/fs/devfs.c
- Timestamp:
- Nov 19, 2020, 11:54:16 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/devfs.c
r657 r673 3 3 * 4 4 * Author Mohamed Lamine Karaoui (2014,2015) 5 * Alain Greiner (2016,2017,2018,2019,2020)5 * Alain Greiner (2016,2017,2018,2019,2020) 6 6 * 7 7 * Copyright (c) Sorbonne Universites … … 124 124 // update inode "type" field 125 125 inode = GET_PTR( *devfs_dev_inode_xp ); 126 inode->type = INODE_TYPE_DIR;126 inode->type = FILE_TYPE_DIR; 127 127 128 128 // create dentries <.> and <..> in <dev> … … 154 154 // update inode "type" field 155 155 inode = GET_PTR( *devfs_external_inode_xp ); 156 inode->type = INODE_TYPE_DIR;156 inode->type = FILE_TYPE_DIR; 157 157 158 158 // create dentries <.> and <..> in <external> … … 201 201 202 202 // create <internal> directory 203 snprint f( node_name , 16 , "internal_%x" , local_cxy );203 snprintk( node_name , 16 , "internal_%x" , local_cxy ); 204 204 205 205 error = vfs_add_child_in_parent( local_cxy, // target cluster … … 212 212 // set <internal> inode "type" field 213 213 internal_inode_ptr = GET_PTR( internal_inode_xp ); 214 internal_inode_ptr->type = INODE_TYPE_DEV;214 internal_inode_ptr->type = FILE_TYPE_DEV; 215 215 216 216 // create dentries <.> and <..> in <internal> … … 262 262 inode_ptr = GET_PTR( inode_xp ); 263 263 inode_ptr->extend = chdev_ptr; 264 inode_ptr->type = INODE_TYPE_DEV;264 inode_ptr->type = FILE_TYPE_DEV; 265 265 266 266 #if DEBUG_DEVFS_LOCAL_INIT … … 305 305 inode_ptr = GET_PTR( inode_xp ); 306 306 inode_ptr->extend = chdev_ptr; 307 inode_ptr->type = INODE_TYPE_DEV;307 inode_ptr->type = FILE_TYPE_DEV; 308 308 309 309 #if DEBUG_DEVFS_LOCAL_INIT … … 341 341 inode_ptr = GET_PTR( inode_xp ); 342 342 inode_ptr->extend = chdev_ptr; 343 inode_ptr->type = INODE_TYPE_DEV;343 inode_ptr->type = FILE_TYPE_DEV; 344 344 345 345 #if DEBUG_DEVFS_LOCAL_INIT … … 378 378 inode_ptr = GET_PTR( inode_xp ); 379 379 inode_ptr->extend = chdev_ptr; 380 inode_ptr->type = INODE_TYPE_DEV;380 inode_ptr->type = FILE_TYPE_DEV; 381 381 382 382 #if DEBUG_DEVFS_LOCAL_INIT … … 417 417 inode_ptr = GET_PTR( inode_xp ); 418 418 inode_ptr->extend = chdev_ptr; 419 inode_ptr->type = INODE_TYPE_DEV;419 inode_ptr->type = FILE_TYPE_DEV; 420 420 421 421 #if DEBUG_DEVFS_LOCAL_INIT … … 456 456 inode_ptr = GET_PTR( inode_xp ); 457 457 inode_ptr->extend = chdev_ptr; 458 inode_ptr->type = INODE_TYPE_DEV;458 inode_ptr->type = FILE_TYPE_DEV; 459 459 460 460 #if DEBUG_DEVFS_LOCAL_INIT … … 495 495 inode_ptr = GET_PTR( inode_xp ); 496 496 inode_ptr->extend = chdev_ptr; 497 inode_ptr->type = INODE_TYPE_DEV;497 inode_ptr->type = FILE_TYPE_DEV; 498 498 499 499 #if DEBUG_DEVFS_LOCAL_INIT … … 534 534 inode_ptr = GET_PTR( inode_xp ); 535 535 inode_ptr->extend = chdev_ptr; 536 inode_ptr->type = INODE_TYPE_DEV;536 inode_ptr->type = FILE_TYPE_DEV; 537 537 538 538 #if DEBUG_DEVFS_LOCAL_INIT … … 573 573 inode_ptr = GET_PTR( inode_xp ); 574 574 inode_ptr->extend = chdev_ptr; 575 inode_ptr->type = INODE_TYPE_DEV;575 inode_ptr->type = FILE_TYPE_DEV; 576 576 577 577 #if DEBUG_DEVFS_LOCAL_INIT … … 612 612 inode_ptr = GET_PTR( inode_xp ); 613 613 inode_ptr->extend = chdev_ptr; 614 inode_ptr->type = INODE_TYPE_DEV;614 inode_ptr->type = FILE_TYPE_DEV; 615 615 616 616 #if DEBUG_DEVFS_LOCAL_INIT … … 643 643 char k_buf[CONFIG_TXT_KBUF_SIZE]; // local kernel buffer 644 644 645 assert( ( file_xp != XPTR_NULL ) , "file_xp == XPTR_NULL" );645 assert( __FUNCTION__, ( file_xp != XPTR_NULL ) , "file_xp == XPTR_NULL" ); 646 646 647 647 #if (DEBUG_SYS_READ & 1) … … 673 673 674 674 // Only TXT devices are associated to a pseudo-file 675 assert( ( func == DEV_FUNC_TXT ) , __FUNCTION__, "illegal device func_type");675 assert( __FUNCTION__, ( func == DEV_FUNC_TXT ) , "illegal device func_type"); 676 676 677 677 // initialise number of bytes to move … … 770 770 771 771 // detailed argument unused 772 assert( (detailed == false) , "detailed argument not supported\n");772 assert( __FUNCTION__, (detailed == false) , "detailed argument not supported\n"); 773 773 774 774 // One loop to scan the target inode xhtab containing the set of dentries
Note: See TracChangeset
for help on using the changeset viewer.