Changeset 409 for trunk/kernel/fs


Ignore:
Timestamp:
Dec 20, 2017, 4:51:09 PM (7 years ago)
Author:
alain
Message:

Fix bugs in exec

Location:
trunk/kernel/fs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/fs/vfs.c

    r408 r409  
    335335////////////////////////////////////////////
    336336void vfs_inode_set_size( xptr_t    inode_xp,
    337                               uint32_t  size )
     337                         uint32_t  size )
    338338{
    339339    // get inode cluster and local pointer
     
    370370
    371371/////////////////////////////////////////
    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 )
     372void vfs_inode_get_name( xptr_t inode_xp,
     373                         char * name )
    384374{
    385375    cxy_t          inode_cxy;
     
    389379    vfs_dentry_t * dentry_ptr;
    390380   
    391     char           name[CONFIG_VFS_MAX_NAME_LENGTH];
    392 
    393381    // get inode cluster and local pointer
    394382    inode_cxy = GET_CXY( inode_xp );
     
    411399                           XPTR( dentry_cxy , &dentry_ptr->name ) );
    412400    }
    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()
    422402
    423403////////////////////////////////////////////////////////////////////////////////////////////
  • trunk/kernel/fs/vfs.h

    r407 r409  
    421421
    422422/******************************************************************************************
    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.
    424426 *****************************************************************************************
    425427 * @ 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 *****************************************************************************************/
     430void vfs_inode_get_name( xptr_t inode_xp,
     431                         char * name );
    437432
    438433
Note: See TracChangeset for help on using the changeset viewer.