Changes between Version 17 and Version 18 of file_system


Ignore:
Timestamp:
Jul 8, 2015, 5:45:50 PM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • file_system

    v17 v18  
    119119
    120120=== int '''_fat_read'''( unsigned int fd_id , void* buffer , unsigned int count ) ===
    121 This function implements the "giet_fat_read()" system call, that has the same semantic as the UNIX "read()" function.
     121This function implements the "giet_fat_read()" system call.
    122122It access the File-Cache  associated to the file identified by the file descriptor, and transfers "count" bytes from the cache to the user buffer, starting from the current file offset.
    123123In case of miss in the File_Cache, it loads all involved clusters into the cache.
     
    125125 * '''buffer''' : pointer on the memory buffer
    126126 * '''count''' : number of bytes
    127 It returns the number of bytes actually transfered if success / It returns 0 if (offset + count > file_size) / It returns -1 if failure.
     127It returns the number of bytes actually transfered if success. It returns 0 if (offset + count > file_size). It returns a negative value if error:
     128 *  -1  : "FAT not initialised"
     129 *  -2  : "Illegal file descriptor"
     130 *  -3  : "File not open"
     131 *  -4  : "Cannot load
    128132
    129133=== int '''_fat_write'''( unsigned int fd_id , void* buffer , unsigned int count ) ===