Changeset 674


Ignore:
Timestamp:
Jul 28, 2015, 6:02:28 PM (9 years ago)
Author:
guerin
Message:

fat32: spelling fixes

Location:
soft/giet_vm/giet_fat32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_fat32/fat32.c

    r665 r674  
    111111// The use_irq argument allows to activate the descheduling mode,
    112112// if it supported by the IOC driver subtype
    113 // It returns O  in case of success.
    114 // It returns -1 in case of error.
     113// It returns 0 on success.
     114// It returns -1 on error.
    115115/////////////////////////////////////////////////////////////////////////////////
    116116
     
    131131// from the local kernel heap, and calls the _fat_ioc_access() function to load
    132132// the missing cluster from the block device.
    133 // It returns O  in case of success.
    134 // It returns 1 in case of error.
     133// It returns 0 on success.
     134// It returns 1 on error.
    135135//////////////////////////////////////////////////////////////////////////////////
    136136
     
    165165// It copies the found name in the "name" buffer (without '/'),
    166166// and updates the "nb_read" argument.
    167 // It returns 0 if success.
     167// It returns 0 on success.
    168168// It returns 1 if one name length > NAME_MAX_SIZE characters
    169169///////////////////////////////////////////////////////////////////////////////////
     
    176176// The following function scan the "pathname" argument, and copies in the
    177177// "name" buffer the last name in path (leaf name).
    178 // It returns 0 if success.
     178// It returns 0 on success.
    179179// It returns 1 if one name length > NAME_MAX_SIZE characters
    180180////////////////////////////////////////////////////////////////////////////////
     
    183183
    184184//////////////////////////////////////////////////////////////////////////////////
    185 // The following function access the Fat-Cache and returns in the "value"
     185// The following function accesses the Fat-Cache and returns in the "value"
    186186// argument the content of the FAT slot identified by the "cluster" argument.
    187187// It loads the missing cluster from block device into cache in case of miss.
    188 // It returns 0 if success.
    189 // It returns 1 if error.
     188// It returns 0 on success.
     189// It returns 1 on error.
    190190//////////////////////////////////////////////////////////////////////////////////
    191191
     
    197197// identified by the "cluster" argument. 
    198198// It loads the missing cluster from block device into cache in case of miss.
    199 // It returns 0 if success,
    200 // It returns 1 if error.
     199// It returns 0 on success,
     200// It returns 1 on error.
    201201//////////////////////////////////////////////////////////////////////////////////
    202202
     
    227227// The cache is identified by the "root" an "levels" arguments.
    228228// The "string" argument is only used for debug : inode name or Fat.
    229 // It returns 0 if success.
    230 // It returns 1 if error.
     229// It returns 0 on success.
     230// It returns 1 on error.
    231231//////////////////////////////////////////////////////////////////////////////////
    232232
     
    236236
    237237//////////////////////////////////////////////////////////////////////////////////
    238 // The following function access directly the FS_INFO block on the block device,
     238// The following function accesses directly the FS_INFO block on the block device,
    239239// to update the "first_free_cluster" and "free_clusters_number" values,
    240240// using only the Fat-Descriptor single block buffer.
    241 // It return 0 in case of success.
    242 // It return 1 in case of error.
     241// It return 0 on success.
     242// It return 1 on error.
    243243//////////////////////////////////////////////////////////////////////////////////
    244244
     
    266266// The following function returns in the "nb_entries" argument the number of files
    267267// (or directories) contained in a directory identified by the "inode " pointer.
    268 // It returns  0 if success.
    269 // It returns  1 if error.
     268// It returns 0 on success.
     269// It returns 1 on error.
    270270//////////////////////////////////////////////////////////////////////////////////
    271271
     
    277277// inode pointer a child (file or directory) identified by its "name".
    278278// It returns in the "inode" argument the searched child inode pointer.
    279 // If the searched name is not found in the Inode-Tree, the function access
     279// If the searched name is not found in the Inode-Tree, the function accesses
    280280// the "file_cache" associated to the parent directory.
    281 // If the child exist on block device, the Inode-Tree is updated, and
     281// If the child exists on block device, the Inode-Tree is updated, and
    282282// a success code is returned.
    283283// If the file/dir does not exist on block device, a error code is returned.
    284284// It returns 0 if inode found.
    285285// It returns 1 if inode not found.
    286 // It returns 2 if error in cache access.
     286// It returns 2 on error in cache access.
    287287//////////////////////////////////////////////////////////////////////////////////
    288288
     
    325325// Medium names (from 14 to 26 characters require 2 LFN entries.
    326326// Large names (up to 31 characters) require 3 LFN entries.
    327 // It returns 0 if success.
     327// It returns 0 on success.
    328328// It returns 1 if length larger than 31 characters.
    329329//////////////////////////////////////////////////////////////////////////////////
     
    343343//////////////////////////////////////////////////////////////////////////////////
    344344// The following function add new "child" in Cache-File of "parent" directory.
    345 // It access the File_Cache associated to the parent directory, and scan the
     345// It accesses the File_Cache associated to the parent directory, and scan the
    346346// clusters allocated to this directory to find the NO_MORE entry.
    347347// This entry will be the first modified entry in the directory.
     
    386386// and to update the clusters chaining.
    387387// The FAT region on block device is updated.
    388 // It returns 0 if success.
    389 // It returns 1 if error.
     388// It returns 0 on success.
     389// It returns 1 on error.
    390390//////////////////////////////////////////////////////////////////////////////////
    391391
     
    398398// It calls _get_fat_entry() and _set_fat_entry() functions to update the
    399399// clusters chaining in the Cache-Fat. The FAT region on block device is updated.
    400 // It returns 0 if success.
    401 // It returns 1 if error.
     400// It returns 0 on success.
     401// It returns 1 on error.
    402402//////////////////////////////////////////////////////////////////////////////////
    403403
     
    460460// It updates the FAT slot, and the two FAT global variables: first_free_cluster,
    461461// and free_clusters_number.
    462 // It returns O if success.
    463 // It returns 1 if error.
     462// It returns 0 on success.
     463// It returns 1 on error.
    464464//////////////////////////////////////////////////////////////////////////////////
    465465
     
    471471// The remove condition must be checked by the caller.
    472472// The relevant lock(s) must have been taken by te caller.
    473 // It returns O if success.
    474 // It returns 1 if error.
     473// It returns 0 on success.
     474// It returns 1 on error.
    475475/////////////////////////////////////////////////////////////////////////////
    476476
     
    484484// it does not use the dynamically allocated File Caches, but uses only
    485485// the 4 Kbytes _fat_buffer_data.
    486 // It returns 0 if success.
    487 // It returns 1 if error.
     486// It returns 0 on success.
     487// It returns 1 on error.
    488488/////////////////////////////////////////////////////////////////////////////
    489489
     
    499499// as it does not use the dynamically allocated Fat-Cache, but uses only
    500500// the 4 Kbytes _fat_buffer_fat.
    501 // It returns 0 if success.
    502 // It returns 1 if error.
     501// It returns 0 on success.
     502// It returns 1 on error.
    503503/////////////////////////////////////////////////////////////////////////////
    504504
     
    566566{
    567567    _printf("\n###############  FAT DESCRIPTOR  ################################" 
    568             "\nFAT initialised                  %x"
     568            "\nFAT initialized                  %x"
    569569            "\nBlock Size  (bytes)              %x"
    570570            "\nCluster Size  (bytes)            %x"
     
    577577            "\nFat_cache_levels                 %d"
    578578            "\n#################################################################\n",
    579             _fat.initialised,
     579            _fat.initialized,
    580580            _fat.sector_size,
    581581            _fat.cluster_size,
     
    26282628/////////////////////////////////////////////////////////////////////////////
    26292629// This function initializes the FAT structures.
    2630 // - The Fat-Descriptor is always initialised.
     2630// - The Fat-Descriptor is always initialized.
    26312631// - The dynamically allocated structures (the Inode-Tre, the Fat_Cache,
    26322632//   and the File-Cache for the root directory) are only allocated
    2633 //   and initialised if the "kernel_mode" argument is set.
     2633//   and initialized if the "kernel_mode" argument is set.
    26342634/////////////////////////////////////////////////////////////////////////////
    26352635// Implementation note:
     
    26422642// Returns a negative value on error:
    26432643//   GIET_FAT32_IO_ERROR,
    2644 //   GIET_FAT32_INVALID_BOOT_SECTOR,
     2644//   GIET_FAT32_INVALID_BOOT_SECTOR
    26452645/////////////////////////////////////////////////////////////////////////////
    26462646int _fat_init( unsigned int kernel_mode ) 
     
    26532653
    26542654    // FAT initialisation should be done only once
    2655     if ( _fat.initialised == FAT_INITIALISED )
     2655    if ( _fat.initialized == FAT_INITIALIZED )
    26562656    {
    26572657        _printf("\n[FAT WARNING] _fat_init(): FAT already initialized\n");
     
    27172717    _fat_buffer_fat_lba      = 0xFFFFFFFF;
    27182718    _fat_buffer_data_lba     = 0xFFFFFFFF;
    2719     _fat.initialised         = FAT_INITIALISED;
     2719    _fat.initialized         = FAT_INITIALIZED;
    27202720
    27212721    // load FS_INFO sector into FAT buffer
     
    28252825#endif
    28262826
    2827     // checking FAT initialised
    2828     if( _fat.initialised != FAT_INITIALISED )
     2827    // checking FAT initialized
     2828    if( _fat.initialized != FAT_INITIALIZED )
    28292829    {
    28302830        _printf("\n[FAT ERROR] _fat_open(): FAT not initialized\n");
     
    30233023int _fat_close( unsigned int fd_id )
    30243024{
    3025     // checking FAT initialised
    3026     if( _fat.initialised != FAT_INITIALISED )
     3025    // checking FAT initialized
     3026    if( _fat.initialized != FAT_INITIALIZED )
    30273027    {
    30283028        _printf("\n[FAT ERROR] _fat_close(): FAT not initialized\n");
     
    31323132                    fat_file_info_t* info )
    31333133{
    3134     if ( _fat.initialised != FAT_INITIALISED )
     3134    if ( _fat.initialized != FAT_INITIALIZED )
    31353135    {
    31363136        _printf("\n[FAT ERROR] _fat_file_info(): FAT not initialized\n");
     
    31663166// In case of miss in the File_Cache, it loads all involved clusters into cache.
    31673167/////////////////////////////////////////////////////////////////////////////////
    3168 // Returns number of bytes actually transfered on success.
     3168// Returns the number of bytes actually transfered on success.
    31693169// Returns 0 if EOF is encountered (offset + count > file_size).
    31703170// Returns a negative value on error:
     
    31783178               unsigned int count )    // number of bytes to read
    31793179{
    3180     // checking FAT initialised
    3181     if( _fat.initialised != FAT_INITIALISED )
     3180    // checking FAT initialized
     3181    if( _fat.initialized != FAT_INITIALIZED )
    31823182    {
    31833183        _printf("\n[FAT ERROR] _fat_write(): FAT not initialized\n");
     
    33323332                unsigned int count )   // number of bytes to write
    33333333{
    3334     // checking FAT initialised
    3335     if( _fat.initialised != FAT_INITIALISED )
    3336     {
    3337         _printf("\n[FAT ERROR] _fat_write(): FAT not initialised\n");
     3334    // checking FAT initialized
     3335    if( _fat.initialized != FAT_INITIALIZED )
     3336    {
     3337        _printf("\n[FAT ERROR] _fat_write(): FAT not initialized\n");
    33383338        return GIET_FAT32_NOT_INITIALIZED;
    33393339    }
     
    35483548                unsigned int whence )
    35493549{
    3550     // checking FAT initialised
    3551     if( _fat.initialised != FAT_INITIALISED )
     3550    // checking FAT initialized
     3551    if( _fat.initialized != FAT_INITIALIZED )
    35523552    {
    35533553        _printf("\n[FAT ERROR] _fat_lseek(): FAT not initialized\n");
     
    36433643#endif
    36443644
    3645     // checking FAT initialised
    3646     if( _fat.initialised != FAT_INITIALISED )
     3645    // checking FAT initialized
     3646    if( _fat.initialized != FAT_INITIALIZED )
    36473647    {
    36483648        _printf("\n[FAT ERROR] _fat_remove(): FAT not initialized\n");
     
    37993799#endif
    38003800
    3801     // checking FAT initialised
    3802     if( _fat.initialised != FAT_INITIALISED )
     3801    // checking FAT initialized
     3802    if( _fat.initialized != FAT_INITIALIZED )
    38033803    {
    38043804        _printf("\n[FAT ERROR] _fat_rename(): FAT not initialized\n");
     
    40304030#endif
    40314031
    4032     // checking FAT initialised
    4033     if( _fat.initialised != FAT_INITIALISED )
     4032    // checking FAT initialized
     4033    if( _fat.initialized != FAT_INITIALIZED )
    40344034    {
    40354035        _printf("\n[FAT ERROR] _fat_mkdir(): FAT not initialized\n");
     
    43364336
    43374337///////////////////////////////////////////////////////////////////////////////
    4338 // This functiond load a file identified by the "pathname" argument into the
     4338// This function loads a file identified by the "pathname" argument into the
    43394339// memory buffer defined by the "buffer_vbase" and "buffer_size" arguments.
    43404340// It is intended to be called by the boot-loader, as it does not use the
     
    43544354                        unsigned int buffer_size )
    43554355{
    4356     // checking FAT initialised
    4357     if( _fat.initialised != FAT_INITIALISED )
     4356    // checking FAT initialized
     4357    if( _fat.initialized != FAT_INITIALIZED )
    43584358    {
    43594359        _printf("\n[FAT ERROR] _fat_load_no_cache(): FAT not initialized\n");
  • soft/giet_vm/giet_fat32/fat32.h

    r663 r674  
    125125/*******************************************************************************/
    126126
    127 #define FAT_INITIALISED         0xBABEF00D
     127#define FAT_INITIALIZED         0xBABEF00D
    128128
    129129/********************************************************************************
     
    199199    unsigned int        fat_cache_levels;        // number of levels in Fat-Cache
    200200    unsigned int        block_buffer_lba;        // lba of block in block_buffer
    201     unsigned int        initialised;             // 0xBABEF00D when FAT initialised
     201    unsigned int        initialized;             // 0xBABEF00D when FAT initialized
    202202    unsigned int        sector_size;             // must be 512
    203203    unsigned int        cluster_size;            // must be 4096
Note: See TracChangeset for help on using the changeset viewer.