Ignore:
Timestamp:
Dec 3, 2018, 12:17:35 PM (3 years ago)
Author:
alain
Message:

Improve the FAT32 file system to support cat, rm, cp commands.

File:
1 edited

Legend:

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

    r563 r603  
    203203   
    204204#if DEBUG_XHTAB
    205 printk("\n[DBG] %s : enter / %s\n", __FUNCTION__, key );
     205printk("\n[%s] enter / key %s\n", __FUNCTION__, key );
    206206#endif
    207207
     
    241241   
    242242#if DEBUG_XHTAB
    243 printk("\n[DBG] %s : success / %s\n", __FUNCTION__, key );
     243printk("\n[%s] success / %s\n", __FUNCTION__, key );
    244244#endif
    245245
     
    248248}  // end xhtab_insert()
    249249
    250 /////////////////////////////////////
    251 error_t xhtab_remove( xptr_t   xhtab_xp,
    252                       void   * key,
    253                       xptr_t   xlist_entry_xp )
     250///////////////////////////////////////
     251bool_t xhtab_remove( xptr_t   xhtab_xp,
     252                     void   * key,
     253                     xptr_t   xlist_entry_xp )
    254254{
    255255    xptr_t             item_xp;
     
    275275    item_xp = xhtab_scan( xhtab_xp , index , key );
    276276
    277     if( item_xp == XPTR_NULL )    // error if not found
     277    if( item_xp == XPTR_NULL )    // return error if not found
    278278    {
    279279        // release the lock protecting hash table
    280280        remote_busylock_release( XPTR( xhtab_cxy , &xhtab_ptr->lock ) );
    281281
    282         return EINVAL;
     282        return false;
    283283    }
    284284    else                          // remove item if found
     
    293293        remote_busylock_release( XPTR( xhtab_cxy , &xhtab_ptr->lock ) );
    294294
    295         return 0;
     295        return true;
    296296    }
    297297}  // end xhtab_remove()
     
    318318   
    319319#if DEBUG_XHTAB
    320 printk("\n[DBG] %s : enter / %s\n", __FUNCTION__, key );
     320printk("\n[%s] enter / %s\n", __FUNCTION__, key );
    321321#endif
    322322
     
    325325   
    326326#if DEBUG_XHTAB
    327 printk("\n[DBG] %s : after lock acquire / %s\n", __FUNCTION__, key );
     327printk("\n[%s] after lock acquire / %s\n", __FUNCTION__, key );
    328328#endif
    329329
     
    332332
    333333#if DEBUG_XHTAB
    334 printk("\n[DBG] %s : after xhtab scan / %s\n", __FUNCTION__, key );
     334printk("\n[%s] after xhtab scan / %s\n", __FUNCTION__, key );
    335335#endif
    336336
     
    339339
    340340#if DEBUG_XHTAB
    341 printk("\n[DBG] %s : after lock release / %s\n", __FUNCTION__, key );
     341printk("\n[%s] after lock release / %s\n", __FUNCTION__, key );
    342342#endif
    343343
Note: See TracChangeset for help on using the changeset viewer.