Changeset 409 for trunk/kernel/fs
- Timestamp:
- Dec 20, 2017, 4:51:09 PM (7 years ago)
- Location:
- trunk/kernel/fs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/vfs.c
r408 r409 335 335 //////////////////////////////////////////// 336 336 void vfs_inode_set_size( xptr_t inode_xp, 337 337 uint32_t size ) 338 338 { 339 339 // get inode cluster and local pointer … … 370 370 371 371 ///////////////////////////////////////// 372 xptr_t vfs_inode_owner( xptr_t inode_xp ) 373 { 374 // get inode cluster and local pointer 375 cxy_t cxy = GET_CXY( inode_xp ); 376 vfs_inode_t * ptr = (vfs_inode_t *)GET_PTR( inode_xp ); 377 378 // get the main lock 379 return remote_spinlock_owner( XPTR( cxy , &ptr->main_lock ) ); 380 } 381 382 ///////////////////////////////////////// 383 void vfs_inode_display( xptr_t inode_xp ) 372 void vfs_inode_get_name( xptr_t inode_xp, 373 char * name ) 384 374 { 385 375 cxy_t inode_cxy; … … 389 379 vfs_dentry_t * dentry_ptr; 390 380 391 char name[CONFIG_VFS_MAX_NAME_LENGTH];392 393 381 // get inode cluster and local pointer 394 382 inode_cxy = GET_CXY( inode_xp ); … … 411 399 XPTR( dentry_cxy , &dentry_ptr->name ) ); 412 400 } 413 414 // display inode header 415 printk("\n***** inode <%s> [%x in cluster %x]\n", 416 name , GET_PTR(inode_xp) , GET_CXY(inode_xp) ); 417 418 // display children from xhtab 419 xhtab_display( XPTR( inode_cxy , &inode_ptr->children ) ); 420 421 } // end vfs_inode_display() 401 } // end vfs_inode_get_name() 422 402 423 403 //////////////////////////////////////////////////////////////////////////////////////////// -
trunk/kernel/fs/vfs.h
r407 r409 421 421 422 422 /****************************************************************************************** 423 * This debug function returns the current owner of the inode main lock. 423 * This debug function copies the name of a remote inode identified by the <inode_xp> 424 * argument to a local buffer identified by the <name> argument. 425 * The local buffer size must be at least CONFIG_VFS_MAX_NAME_LENGTH. 424 426 ***************************************************************************************** 425 427 * @ inode_xp : extended pointer on the remote inode. 426 * @ return extended pointer on owner thread / return XPTR_NULL if lock not taken. 427 *****************************************************************************************/ 428 xptr_t vfs_inode_owner( xptr_t inode_xp ); 429 430 /****************************************************************************************** 431 * This debug function diplays the name of the inode identified by the <inode_xp> 432 * argument, and all children names for a directory. 433 ***************************************************************************************** 434 * @ inode_xp : extended pointer on the remote inode. 435 *****************************************************************************************/ 436 void vfs_inode_display( xptr_t inode_xp ); 428 * @ name : local buffer pointer. 429 *****************************************************************************************/ 430 void vfs_inode_get_name( xptr_t inode_xp, 431 char * name ); 437 432 438 433
Note: See TracChangeset
for help on using the changeset viewer.