Ignore:
Timestamp:
Jul 21, 2017, 7:36:08 AM (7 years ago)
Author:
alain
Message:

Fix several bugs in VFS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/vfs/fatfs.h

    r246 r265  
    183183
    184184//////////////////////////////////////////////////////////////////////////////////////////
    185 //              FATFS specific but public functions (used by RPC)
     185//              FATFS specific extern functions
    186186//////////////////////////////////////////////////////////////////////////////////////////
    187187
    188188/******************************************************************************************
    189  * This static function scan the FAT (File Allocation Table), stored in the FAT mapper,
     189 * This function scan the FAT (File Allocation Table), stored in the FAT mapper,
    190190 * and returns the FATFS cluster index for a given page of a given file.
    191191 * It must be called by a thread running in the cluster containing the FAT mapper.
     192 * We can use a RPC to scan the remote FAT mapper, because the RPC_FIFO will avoid
     193 * contention in the cluster containing the FAT mapper, and the RPC latency is not
     194 * critical compared to the device access latency.
    192195 * The FAT is actually an array of uint32_t slots. Each slot in this array contains the
    193196 * index of another slot in this array, to form one linked list for each file stored on
     
    198201 * automatically updates the FAT mapper from informations stored on device in case of miss.
    199202 ******************************************************************************************
    200  * @ mapper              : local pointer on the FAT mapper.
    201  * @ first_cluster       : index of the first FATFS cluster allocated to the file.
    202  * @ searched_page   : index of searched page in the file.
    203  * @ cluster         : [out] pointer on buffer for the found FATFS cluster index.
    204  * @ return 0 if success / return EIO if FAT mapper miss cannot be solved.
     203 * @ mapper                  : local pointer on the FAT mapper.
     204 * @ first_cluster_id    : index of the first FATFS cluster allocated to the file.
     205 * @ searched_page       : index of searched page in the file.
     206 * @ searched_cluster_id : [out] found FATFS cluster index.
     207 * @ return 0 if success / return EIO if a FAT mapper miss cannot be solved.
    205208 *****************************************************************************************/
    206209error_t fatfs_get_cluster( struct mapper_s * mapper,
    207210                           uint32_t          first_cluster,
    208                            uint32_t          searched_page,
    209                            uint32_t        * cluster );
    210 
    211 
     211                           uint32_t          page_index,
     212                           uint32_t        * searched_cluster_id );
     213
     214/******************************************************************************************
     215 * This function display the content of the FATFS context.
     216 *****************************************************************************************/
     217void fatfs_ctx_display();
    212218
    213219
Note: See TracChangeset for help on using the changeset viewer.