Changes between Version 17 and Version 18 of file_system
- Timestamp:
- Jul 8, 2015, 5:45:50 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
file_system
v17 v18 119 119 120 120 === 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.121 This function implements the "giet_fat_read()" system call. 122 122 It 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. 123 123 In case of miss in the File_Cache, it loads all involved clusters into the cache. … … 125 125 * '''buffer''' : pointer on the memory buffer 126 126 * '''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. 127 It 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 128 132 129 133 === int '''_fat_write'''( unsigned int fd_id , void* buffer , unsigned int count ) ===