Changeset 634 for soft/giet_vm
- Timestamp:
- Jul 18, 2015, 3:26:37 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_fat32/fat32.c
r626 r634 3109 3109 // It transfers "count" bytes from the File_Cache associated to the file 3110 3110 // identified by "fd_id", to the user "buffer", from the current file offset. 3111 // It has the same semantic as the UNIX "read()" function.3112 3111 // In case of miss in the File_Cache, it loads all involved clusters into cache. 3113 3112 ///////////////////////////////////////////////////////////////////////////////// … … 3116 3115 // Returns a negative value if error: 3117 3116 // -1 : "fat not initialised" 3117 // -2 : "illegal file descriptor" 3118 3118 // -2 : "file not open" 3119 3119 // -3 : "cannot load file from device" … … 3134 3134 { 3135 3135 _printf("\n[FAT ERROR] in _fat_read() : illegal file descriptor\n"); 3136 return - 1;3136 return -2; 3137 3137 } 3138 3138 … … 3141 3141 { 3142 3142 _printf("\n[FAT ERROR] in _fat_read() : file not open\n"); 3143 return - 2;3143 return -3; 3144 3144 } 3145 3145 … … 3198 3198 _printf("\n[FAT ERROR] in _fat_read() : cannot load file <%s>\n", 3199 3199 inode->name ); 3200 return - 3;3200 return -4; 3201 3201 } 3202 3202 cbuf = pdesc->buffer; … … 3260 3260 // It transfers "count" bytes to the fat_cache associated to the file 3261 3261 // identified by "fd_id", from the user "buffer", using the current file offset. 3262 // It has the same semantic as the UNIX "write()" function.3263 3262 // It increases the file size and allocate new clusters if (count + offset) 3264 3263 // is larger than the current file size. Then it loads and updates all … … 4130 4129 // -4 : "Not a directory" 4131 4130 // -5 : "Cannot access directory" 4132 // -6 : "Name too long truncated"4133 4131 ///////////////////////////////////////////////////////////////////////////////// 4134 4132 int _fat_list( char* pathname )
Note: See TracChangeset
for help on using the changeset viewer.