Changes between Version 22 and Version 23 of file_system


Ignore:
Timestamp:
Jul 28, 2015, 3:18:00 PM (9 years ago)
Author:
guerin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • file_system

    v22 v23  
    225225 *  -11 : "cannot remove to_remove node from FS"
    226226
    227 === __int '''_fat_list'''( char* pathname )__ ===
    228 This function implements the giet_fat_list() system call.
    229 It displays the content of a directory identified by the pathname argument.
    230 It returns 0 if success. It returns a negative value if error:
    231  *   -1  : "FAT not initialised
    232  *   -2  : "Directory not found"
    233  *   -3  : "Name in path too long
    234  *   -4  : "Not a directory"
    235  *   -5  : "Cannot access directory"
     227=== __int '''_fat_opendir'''( char* pathname )__ ===
     228This function implements the giet_fat_opendir() system call.
     229The semantic is similar to the UNIX opendir() function. If the specified directory does not exist, an error is returned. It allocates a file descriptor to the calling task, for the directory identified by "pathname". If several tasks try to open the same directory, each task obtains a private file descriptor. A node name cannot be larger than 31 characters.
     230 * '''pathname''' : directory complete pathname
     231Returns a file descriptor for the directory index on success.
     232Returns a negative value on error:
     233 * GIET_FAT32_NOT_INITIALIZED,
     234 * GIET_FAT32_NAME_TOO_LONG,
     235 * GIET_FAT32_FILE_NOT_FOUND,
     236 * GIET_FAT32_TOO_MANY_OPEN_FILES,
     237 * GIET_FAT32_NOT_A_DIRECTORY
     238
     239=== __int '''_fat_closedir'''( unsigned int fd_id )__ ===
     240This function implements the "giet_fat_closedir()" system call.
     241Same behavior as _fat_close(), no check for directory.
     242 * '''fd_id''' : file descriptor index
     243Returns GIET_FAT32_OK on success. Returns a negative value on error:
     244 * GIET_FAT32_NOT_INITIALIZED,
     245 * GIET_FAT32_INVALID_FD,
     246 * GIET_FAT32_NOT_OPEN,
     247 * GIET_FAT32_IO_ERROR
     248
     249=== __int '''_fat_readdir'''( unsigned int fd_id, fat_dirent_t* entry )__ ===
     250This function implements the "giet_fat_readdir()" system call.
     251It reads one directory entry from the file descriptor opened by "giet_fat_opendir()" and writes its info to the "entry" argument. This includes the cluster, size, is_dir and name info for each entry.
     252 * '''fd_id''' : file descriptor index
     253 * '''entry''' : pointer to write
     254Returns GIET_FAT32_OK on success. Returns a negative value on error:
     255 * GIET_FAT32_NOT_INITIALIZED,
     256 * GIET_FAT32_INVALID_FD,
     257 * GIET_FAT32_NOT_OPEN,
     258 * GIET_FAT32_NOT_A_DIRECTORY,
     259 * GIET_FAT32_IO_ERROR,
     260 * GIET_FAT32_NO_MORE_ENTRIES
    236261
    237262=== __int '''_fat_read_no_cache'''( char* pathname , unsigned int buffer_vbase , unsigned int buffer_size )__ ===