Changeset 623 for trunk/kernel/fs/fatfs.h
- Timestamp:
- Mar 6, 2019, 4:37:15 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/fatfs.h
r614 r623 309 309 310 310 /***************************************************************************************** 311 * This function implements the generic vfs_fs_get_dentry() function for the FATFS. 312 ***************************************************************************************** 313 * It initialises a new child (new inode/dentry couple in Inode Tree), identified 314 * by the <child_inode_xp> argument, from the parent directory mapper, identified by the 315 * <parent_inode> argument. 311 * This function implements the generic vfs_fs_new_dentry() function for the FATFS. 312 ***************************************************************************************** 313 * It initializes a new inode/dentry couple in Inode Tree, attached to the directory 314 * identified by the <parent_inode> argument. The new directory entry is identified 315 * by the <name> argument. The child inode descriptor identified by the <child_inode_xp> 316 * argument, and the dentry descriptor must have been previously allocated. 316 317 * It scan the parent mapper to find the <name> argument. 317 318 * It set the "type", "size", and "extend" fields in inode descriptor. … … 324 325 * @ return 0 if success / return ENOENT if child not found. 325 326 ****************************************************************************************/ 326 error_t fatfs_ get_dentry( struct vfs_inode_s * parent_inode,327 error_t fatfs_new_dentry( struct vfs_inode_s * parent_inode, 327 328 char * name, 328 329 xptr_t child_inode_xp ); 329 330 330 331 /***************************************************************************************** 332 * This function implements the generic vfs_fs_update_dentry() function for the FATFS. 333 ***************************************************************************************** 334 * It update the size of a directory entry identified by the <dentry> argument in 335 * the mapper of a directory identified by the <inode> argument, as defined by the <size> 336 * argument. 337 * It scan the mapper to find the entry identified by the dentry "name" field. 338 * It set the "size" field in the in the directory mapper AND marks the page as DIRTY. 339 * It must be called by a thread running in the cluster containing the directory inode. 340 ***************************************************************************************** 341 * @ inode : local pointer on inode (directory). 342 * @ dentry : local pointer on dentry (for name). 343 * @ size : new size value. 344 * @ return 0 if success / return ENOENT if child not found. 345 ****************************************************************************************/ 346 error_t fatfs_update_dentry( struct vfs_inode_s * inode, 347 struct vfs_dentry_s * dentry, 348 uint32_t size ); 349 350 /***************************************************************************************** 331 351 * This function implements the generic vfs_fs_get_user_dir() function for the FATFS. 332 352 ***************************************************************************************** 333 353 * It is called by the remote_dir_create() function to scan the mapper of a directory 334 * identified by the <inode> argument and copy up to <max_dirent> valid dentries to a354 * identified by the <inode> argument, and copy up to <max_dirent> valid dentries to a 335 355 * local dirent array, defined by the <array> argument. The <min_dentry> argument defines 336 * the index of the first dentry to copied to the target dirent array.356 * the index of the first dentry to be copied to the target dirent array. 337 357 * This function returns in the <entries> buffer the number of dentries actually written, 338 358 * and signals in the <done> buffer when the last valid entry has been found. 339 359 * If the <detailed> argument is true, a dentry/inode couple that does not exist in 340 * the Inode Tree is dynamically created, and all dirent fiel s are documented in the360 * the Inode Tree is dynamically created, and all dirent fields are documented in the 341 361 * dirent array. Otherwise, only the dentry name is documented. 342 362 * It must be called by a thread running in the cluster containing the directory inode. … … 443 463 * The page - and the mapper - can be located in another cluster than the calling thread. 444 464 * The pointer on the mapper and the page index in file are found in the page descriptor. 445 * It is used for both fora regular file/directory mapper, and the FAT mapper.465 * It is used for both a regular file/directory mapper, and the FAT mapper. 446 466 * For the FAT mapper, it access the FATFS to get the location on IOC device. 447 467 * For a regular file, it access the FAT mapper to get the cluster index on IOC device.
Note: See TracChangeset
for help on using the changeset viewer.