src/kernel/fs/fat32.c
/*!
 * @note store entry from cache to block layer.
 * @warning Must Invoking With Holding Entry`s Write
 *          And Parent`s Write Lock.
 * @param entry
 */
@note store entry from cache to block layer.
@warning Must Invoking With Holding Entry`s Write
And Parent`s Write Lock.
@param entry
@note store entry from cache to block layer . @warning Must Invoking With Holding Entry ` s Write And Parent ` s Write Lock . @param entry
static bool _entry_flush(entry_t * entry){
    if(entry->parent==NULL||entry->parent == ROOT_PARENT||(!entry->dirty)){
        return false;
    }
    entry_t * parent = entry->parent;
    entry_data_t data;
    data.file_size = entry->file_size;
    data.attr = entry->attr;
    data.first_clus_low = entry->first_clus_no<<16>>16;
    data.first_clus_high = entry->first_clus_no>>16;
    if(!_full_name_put_to_data(&data,entry->filename)){
        return false;
    }
    return _multi_clus_rw(parent->first_clus_no,&data,entry->offset_in_dir,32,true);
}
static bool _entry_flush ( entry_t * entry ) { if ( entry -> parent == NULL || entry -> parent == ROOT_PARENT || ( ! entry -> dirty ) ) { return false ; } entry_t * parent = entry -> parent ; entry_data_t data ; data . file_size = entry -> file_size ; data . attr = entry -> attr ; data . first_clus_low = entry -> first_clus_no << 16 >> 16 ; data . first_clus_high = entry -> first_clus_no >> 16 ; if ( ! _full_name_put_to_data ( & data , entry -> filename ) ) { return false ; } return _multi_clus_rw ( parent -> first_clus_no , & data , entry -> offset_in_dir , 32 , true ) ; }
@note store entry from cache to block layer.
@note store entry from cache to block layer .
// filename is invalid