Index: soft/giet_vm/giet_fat32/fat32.c
===================================================================
--- soft/giet_vm/giet_fat32/fat32.c	(revision 665)
+++ soft/giet_vm/giet_fat32/fat32.c	(revision 674)
@@ -111,6 +111,6 @@
 // The use_irq argument allows to activate the descheduling mode,
 // if it supported by the IOC driver subtype
-// It returns O  in case of success.
-// It returns -1 in case of error.
+// It returns 0 on success.
+// It returns -1 on error.
 /////////////////////////////////////////////////////////////////////////////////
 
@@ -131,6 +131,6 @@
 // from the local kernel heap, and calls the _fat_ioc_access() function to load 
 // the missing cluster from the block device.
-// It returns O  in case of success.
-// It returns 1 in case of error.
+// It returns 0 on success.
+// It returns 1 on error.
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -165,5 +165,5 @@
 // It copies the found name in the "name" buffer (without '/'), 
 // and updates the "nb_read" argument.
-// It returns 0 if success.
+// It returns 0 on success.
 // It returns 1 if one name length > NAME_MAX_SIZE characters
 ///////////////////////////////////////////////////////////////////////////////////
@@ -176,5 +176,5 @@
 // The following function scan the "pathname" argument, and copies in the
 // "name" buffer the last name in path (leaf name).
-// It returns 0 if success.
+// It returns 0 on success.
 // It returns 1 if one name length > NAME_MAX_SIZE characters
 ////////////////////////////////////////////////////////////////////////////////
@@ -183,9 +183,9 @@
 
 //////////////////////////////////////////////////////////////////////////////////
-// The following function access the Fat-Cache and returns in the "value"
+// The following function accesses the Fat-Cache and returns in the "value"
 // argument the content of the FAT slot identified by the "cluster" argument.
 // It loads the missing cluster from block device into cache in case of miss.
-// It returns 0 if success.
-// It returns 1 if error.
+// It returns 0 on success.
+// It returns 1 on error.
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -197,6 +197,6 @@
 // identified by the "cluster" argument.  
 // It loads the missing cluster from block device into cache in case of miss.
-// It returns 0 if success,
-// It returns 1 if error.
+// It returns 0 on success,
+// It returns 1 on error.
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -227,6 +227,6 @@
 // The cache is identified by the "root" an "levels" arguments.
 // The "string" argument is only used for debug : inode name or Fat.
-// It returns 0 if success.
-// It returns 1 if error.
+// It returns 0 on success.
+// It returns 1 on error.
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -236,9 +236,9 @@
 
 //////////////////////////////////////////////////////////////////////////////////
-// The following function access directly the FS_INFO block on the block device, 
+// The following function accesses directly the FS_INFO block on the block device, 
 // to update the "first_free_cluster" and "free_clusters_number" values,
 // using only the Fat-Descriptor single block buffer.
-// It return 0 in case of success.
-// It return 1 in case of error.
+// It return 0 on success.
+// It return 1 on error.
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -266,6 +266,6 @@
 // The following function returns in the "nb_entries" argument the number of files
 // (or directories) contained in a directory identified by the "inode " pointer.
-// It returns  0 if success.
-// It returns  1 if error.
+// It returns 0 on success.
+// It returns 1 on error.
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -277,12 +277,12 @@
 // inode pointer a child (file or directory) identified by its "name".
 // It returns in the "inode" argument the searched child inode pointer.
-// If the searched name is not found in the Inode-Tree, the function access
+// If the searched name is not found in the Inode-Tree, the function accesses
 // the "file_cache" associated to the parent directory.
-// If the child exist on block device, the Inode-Tree is updated, and
+// If the child exists on block device, the Inode-Tree is updated, and
 // a success code is returned.
 // If the file/dir does not exist on block device, a error code is returned.
 // It returns 0 if inode found.
 // It returns 1 if inode not found.
-// It returns 2 if error in cache access.
+// It returns 2 on error in cache access.
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -325,5 +325,5 @@
 // Medium names (from 14 to 26 characters require 2 LFN entries.
 // Large names (up to 31 characters) require 3 LFN entries. 
-// It returns 0 if success.
+// It returns 0 on success.
 // It returns 1 if length larger than 31 characters.
 //////////////////////////////////////////////////////////////////////////////////
@@ -343,5 +343,5 @@
 //////////////////////////////////////////////////////////////////////////////////
 // The following function add new "child" in Cache-File of "parent" directory.
-// It access the File_Cache associated to the parent directory, and scan the
+// It accesses the File_Cache associated to the parent directory, and scan the
 // clusters allocated to this directory to find the NO_MORE entry.
 // This entry will be the first modified entry in the directory.
@@ -386,6 +386,6 @@
 // and to update the clusters chaining.
 // The FAT region on block device is updated.
-// It returns 0 if success.
-// It returns 1 if error.
+// It returns 0 on success.
+// It returns 1 on error.
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -398,6 +398,6 @@
 // It calls _get_fat_entry() and _set_fat_entry() functions to update the
 // clusters chaining in the Cache-Fat. The FAT region on block device is updated.
-// It returns 0 if success.
-// It returns 1 if error.
+// It returns 0 on success.
+// It returns 1 on error.
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -460,6 +460,6 @@
 // It updates the FAT slot, and the two FAT global variables: first_free_cluster,
 // and free_clusters_number.
-// It returns O if success.
-// It returns 1 if error.
+// It returns 0 on success.
+// It returns 1 on error.
 //////////////////////////////////////////////////////////////////////////////////
 
@@ -471,6 +471,6 @@
 // The remove condition must be checked by the caller.
 // The relevant lock(s) must have been taken by te caller.
-// It returns O if success.
-// It returns 1 if error.
+// It returns 0 on success.
+// It returns 1 on error.
 /////////////////////////////////////////////////////////////////////////////
 
@@ -484,6 +484,6 @@
 // it does not use the dynamically allocated File Caches, but uses only
 // the 4 Kbytes _fat_buffer_data. 
-// It returns 0 if success.
-// It returns 1 if error.
+// It returns 0 on success.
+// It returns 1 on error.
 /////////////////////////////////////////////////////////////////////////////
 
@@ -499,6 +499,6 @@
 // as it does not use the dynamically allocated Fat-Cache, but uses only 
 // the 4 Kbytes _fat_buffer_fat.
-// It returns 0 if success.
-// It returns 1 if error.
+// It returns 0 on success.
+// It returns 1 on error.
 /////////////////////////////////////////////////////////////////////////////
 
@@ -566,5 +566,5 @@
 {
     _printf("\n###############  FAT DESCRIPTOR  ################################"  
-            "\nFAT initialised                  %x"
+            "\nFAT initialized                  %x"
             "\nBlock Size  (bytes)              %x"
             "\nCluster Size  (bytes)            %x"
@@ -577,5 +577,5 @@
             "\nFat_cache_levels                 %d" 
             "\n#################################################################\n",
-            _fat.initialised,
+            _fat.initialized,
             _fat.sector_size,
             _fat.cluster_size,
@@ -2628,8 +2628,8 @@
 /////////////////////////////////////////////////////////////////////////////
 // This function initializes the FAT structures.
-// - The Fat-Descriptor is always initialised.
+// - The Fat-Descriptor is always initialized.
 // - The dynamically allocated structures (the Inode-Tre, the Fat_Cache, 
 //   and the File-Cache for the root directory) are only allocated
-//   and initialised if the "kernel_mode" argument is set.
+//   and initialized if the "kernel_mode" argument is set.
 /////////////////////////////////////////////////////////////////////////////
 // Implementation note:
@@ -2642,5 +2642,5 @@
 // Returns a negative value on error:
 //   GIET_FAT32_IO_ERROR,
-//   GIET_FAT32_INVALID_BOOT_SECTOR,
+//   GIET_FAT32_INVALID_BOOT_SECTOR
 /////////////////////////////////////////////////////////////////////////////
 int _fat_init( unsigned int kernel_mode )  
@@ -2653,5 +2653,5 @@
 
     // FAT initialisation should be done only once
-    if ( _fat.initialised == FAT_INITIALISED )
+    if ( _fat.initialized == FAT_INITIALIZED )
     {
         _printf("\n[FAT WARNING] _fat_init(): FAT already initialized\n");
@@ -2717,5 +2717,5 @@
     _fat_buffer_fat_lba      = 0xFFFFFFFF;
     _fat_buffer_data_lba     = 0xFFFFFFFF;
-    _fat.initialised         = FAT_INITIALISED;
+    _fat.initialized         = FAT_INITIALIZED;
 
     // load FS_INFO sector into FAT buffer
@@ -2825,6 +2825,6 @@
 #endif
 
-    // checking FAT initialised
-    if( _fat.initialised != FAT_INITIALISED )
+    // checking FAT initialized
+    if( _fat.initialized != FAT_INITIALIZED )
     {
         _printf("\n[FAT ERROR] _fat_open(): FAT not initialized\n");
@@ -3023,6 +3023,6 @@
 int _fat_close( unsigned int fd_id )
 {
-    // checking FAT initialised
-    if( _fat.initialised != FAT_INITIALISED )
+    // checking FAT initialized
+    if( _fat.initialized != FAT_INITIALIZED )
     {
         _printf("\n[FAT ERROR] _fat_close(): FAT not initialized\n");
@@ -3132,5 +3132,5 @@
                     fat_file_info_t* info )
 {
-    if ( _fat.initialised != FAT_INITIALISED )
+    if ( _fat.initialized != FAT_INITIALIZED )
     {
         _printf("\n[FAT ERROR] _fat_file_info(): FAT not initialized\n");
@@ -3166,5 +3166,5 @@
 // In case of miss in the File_Cache, it loads all involved clusters into cache.
 /////////////////////////////////////////////////////////////////////////////////
-// Returns number of bytes actually transfered on success.
+// Returns the number of bytes actually transfered on success.
 // Returns 0 if EOF is encountered (offset + count > file_size). 
 // Returns a negative value on error:
@@ -3178,6 +3178,6 @@
                unsigned int count )    // number of bytes to read
 {
-    // checking FAT initialised
-    if( _fat.initialised != FAT_INITIALISED )
+    // checking FAT initialized
+    if( _fat.initialized != FAT_INITIALIZED )
     {
         _printf("\n[FAT ERROR] _fat_write(): FAT not initialized\n");
@@ -3332,8 +3332,8 @@
                 unsigned int count )   // number of bytes to write
 {
-    // checking FAT initialised
-    if( _fat.initialised != FAT_INITIALISED )
-    {
-        _printf("\n[FAT ERROR] _fat_write(): FAT not initialised\n");
+    // checking FAT initialized
+    if( _fat.initialized != FAT_INITIALIZED )
+    {
+        _printf("\n[FAT ERROR] _fat_write(): FAT not initialized\n");
         return GIET_FAT32_NOT_INITIALIZED;
     }
@@ -3548,6 +3548,6 @@
                 unsigned int whence )
 {
-    // checking FAT initialised
-    if( _fat.initialised != FAT_INITIALISED )
+    // checking FAT initialized
+    if( _fat.initialized != FAT_INITIALIZED )
     {
         _printf("\n[FAT ERROR] _fat_lseek(): FAT not initialized\n");
@@ -3643,6 +3643,6 @@
 #endif
 
-    // checking FAT initialised
-    if( _fat.initialised != FAT_INITIALISED )
+    // checking FAT initialized
+    if( _fat.initialized != FAT_INITIALIZED )
     {
         _printf("\n[FAT ERROR] _fat_remove(): FAT not initialized\n");
@@ -3799,6 +3799,6 @@
 #endif
 
-    // checking FAT initialised
-    if( _fat.initialised != FAT_INITIALISED )
+    // checking FAT initialized
+    if( _fat.initialized != FAT_INITIALIZED )
     {
         _printf("\n[FAT ERROR] _fat_rename(): FAT not initialized\n");
@@ -4030,6 +4030,6 @@
 #endif
 
-    // checking FAT initialised
-    if( _fat.initialised != FAT_INITIALISED )
+    // checking FAT initialized
+    if( _fat.initialized != FAT_INITIALIZED )
     {
         _printf("\n[FAT ERROR] _fat_mkdir(): FAT not initialized\n");
@@ -4336,5 +4336,5 @@
 
 ///////////////////////////////////////////////////////////////////////////////
-// This functiond load a file identified by the "pathname" argument into the
+// This function loads a file identified by the "pathname" argument into the
 // memory buffer defined by the "buffer_vbase" and "buffer_size" arguments.
 // It is intended to be called by the boot-loader, as it does not use the
@@ -4354,6 +4354,6 @@
                         unsigned int buffer_size ) 
 {
-    // checking FAT initialised
-    if( _fat.initialised != FAT_INITIALISED )
+    // checking FAT initialized
+    if( _fat.initialized != FAT_INITIALIZED )
     {
         _printf("\n[FAT ERROR] _fat_load_no_cache(): FAT not initialized\n");
