Ignore:
Timestamp:
Dec 27, 2018, 7:38:58 PM (5 years ago)
Author:
alain
Message:

Fix several bugs in VFS to support the following
ksh commandis : cp, mv, rm, mkdir, cd, pwd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/libk/xhtab.c

    r603 r610  
    4040
    4141///////////////////////////////////////////////////////////////////////////////////////////
    42 // vfs_dentry_t
     42// XHTAB_DENTRY_TYPE
    4343// This functions compute the hash index from the key, that is the directory entry name.
    4444///////////////////////////////////////////////////////////////////////////////////////////
     
    5858
    5959///////////////////////////////////////////////////////////////////////////////////////////
    60 // vfs_dentry_t
     60// XHTAB_DENTRY_TYPE
    6161// This functions returns the extended pointer on the item, from the extended pointer
    6262// on xlist contained in the item.
     
    6767static xptr_t xhtab_dentry_item_from_xlist( xptr_t xlist_xp )
    6868{
    69     return XLIST_ELEMENT( xlist_xp , vfs_dentry_t , list );
     69    return XLIST_ELEMENT( xlist_xp , vfs_dentry_t , children );
    7070}
    7171
    7272////////////////////////////////////////////////////////////////////////////////////////////
    73 // vfs_dentry_t
     73// XHTAB_DENTRY_TYPE
    7474// This function compares the identifier of an item to a given <key>.
    7575// it returns true when the directory name matches the name pointed by the <key> argument.
     
    9696
    9797////////////////////////////////////////////////////////////////////////////////////////////
    98 // vfs_dentry_t
     98// XHTAB_DENTRY_TYPE
    9999// This function print the item key, that is the name for a vfs_dentry_t.
    100100////////////////////////////////////////////////////////////////////////////////////////////
     
    150150                xlist_root_init( XPTR( local_cxy , &xhtab->roots[i] ) );
    151151    } 
     152
     153#if DEBUG_XHTAB
     154printk("\n@@@ %s for xhtab (%x,%x)\n"
     155" - index_from_key  = %x (@ %x)\n"
     156" - item_match_key  = %x (@ %x)\n"
     157" - item_from_xlist = %x (@ %x)\n",
     158__FUNCTION__, local_cxy, xhtab,
     159xhtab->index_from_key , &xhtab->index_from_key,
     160xhtab->item_match_key , &xhtab->item_match_key,
     161xhtab->item_from_xlist, &xhtab->item_from_xlist );
     162#endif
    152163
    153164}  // end xhtab_init()
Note: See TracChangeset for help on using the changeset viewer.