|
RTEMS CPU Kit with SuperCore
4.10.99.0
|
File system types and mount. More...
|
Data Structures | |
| struct | rtems_filesystem_mount_table_entry_tt |
| Mount table entry. More... | |
| struct | rtems_filesystem_table_t |
| File system table entry. More... | |
| struct | rtems_filesystem_mount_configuration |
Modules | |
| Device Only File System | |
This structure defines the type of device table. | |
| FAT Filesystem Support | |
FAT file system configuration support, format and mount options. | |
| File System Mount Support | |
File System Mount Functions. | |
| In-Memory File System Support | |
In-Memory File System Support. | |
| FIFO/Pipe File System Support | |
Interface to the POSIX FIFO/Pipe File System. | |
| RTEMS File System Group Management | |
Typedefs | |
|
typedef struct rtems_filesystem_table_t | rtems_filesystem_table_t |
| File system table entry. | |
| typedef bool(* | rtems_per_filesystem_routine )(const rtems_filesystem_table_t *fs_entry, void *arg) |
| Per file system type routine. | |
| typedef bool(* | rtems_filesystem_mt_entry_visitor )(const rtems_filesystem_mount_table_entry_t *mt_entry, void *arg) |
| Mount table entry visitor. | |
Enumerations | |
| enum | rtems_filesystem_options_t { RTEMS_FILESYSTEM_READ_ONLY, RTEMS_FILESYSTEM_READ_WRITE, RTEMS_FILESYSTEM_BAD_OPTIONS } |
| File system options. | |
Functions | |
| int | rtems_filesystem_register (const char *type, rtems_filesystem_fsmount_me_t mount_h) |
| Registers a file system type. | |
| int | rtems_filesystem_unregister (const char *type) |
| Unregisters a file system type. | |
| int | unmount (const char *mount_path) |
| Unmounts the file system at mount_path. | |
| int | mount (const char *source, const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data) |
| Mounts a file system at target. | |
| int | mount_and_make_target_path (const char *source, const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data) |
| Mounts a file system and makes the target path. | |
| bool | rtems_filesystem_iterate (rtems_per_filesystem_routine routine, void *routine_arg) |
| Iterates over all file system types. | |
| bool | rtems_filesystem_mount_iterate (rtems_filesystem_mt_entry_visitor visitor, void *visitor_arg) |
| Iterates over all file system mount entries. | |
Variables | |
| const rtems_filesystem_table_t | rtems_filesystem_table [] |
| Static table of file systems. | |
| rtems_chain_control | rtems_filesystem_mount_table |
|
const rtems_filesystem_mount_configuration | rtems_filesystem_root_configuration |
File System Types | |
| #define | RTEMS_FILESYSTEM_TYPE_IMFS "imfs" |
| #define | RTEMS_FILESYSTEM_TYPE_MINIIMFS "mimfs" |
| #define | RTEMS_FILESYSTEM_TYPE_DEVFS "devfs" |
| #define | RTEMS_FILESYSTEM_TYPE_FTPFS "ftpfs" |
| #define | RTEMS_FILESYSTEM_TYPE_TFTPFS "tftpfs" |
| #define | RTEMS_FILESYSTEM_TYPE_NFS "nfs" |
| #define | RTEMS_FILESYSTEM_TYPE_DOSFS "dosfs" |
| #define | RTEMS_FILESYSTEM_TYPE_RFS "rfs" |
File system types and mount.
| typedef bool(* rtems_filesystem_mt_entry_visitor)(const rtems_filesystem_mount_table_entry_t *mt_entry, void *arg) |
Mount table entry visitor.
| true | Stop the iteration. |
| false | Continue the iteration. |
| typedef bool(* rtems_per_filesystem_routine)(const rtems_filesystem_table_t *fs_entry, void *arg) |
Per file system type routine.
| true | Stop the iteration. |
| false | Continue the iteration. |
| int mount | ( | const char * | source, |
| const char * | target, | ||
| const char * | filesystemtype, | ||
| rtems_filesystem_options_t | options, | ||
| const void * | data | ||
| ) |
Mounts a file system at target.
The source may be a path to the corresponding device file, or NULL. The target path must lead to an existing directory, or NULL. In case target is NULL, the root file system will be mounted. The data parameter will be forwarded to the file system initialization handler. The file system type is selected by filesystemtype and may be one of
Only configured or registered file system types are available. You can add file system types to your application configuration with
| 0 | Successful operation. |
| -1 | An error occurred. The errno indicates the error. |
| int mount_and_make_target_path | ( | const char * | source, |
| const char * | target, | ||
| const char * | filesystemtype, | ||
| rtems_filesystem_options_t | options, | ||
| const void * | data | ||
| ) |
Mounts a file system and makes the target path.
The target path will be created with rtems_mkdir() and must not be NULL.
| 0 | Successful operation. |
| -1 | An error occurred. The errno indicates the error. |
| bool rtems_filesystem_iterate | ( | rtems_per_filesystem_routine | routine, |
| void * | routine_arg | ||
| ) |
Iterates over all file system types.
For each file system type the routine will be called with the entry and the routine_arg parameter.
Do not register or unregister file system types in routine.
The iteration is protected by the IO library mutex.
| true | Iteration stopped due to routine return status. |
| false | Iteration through all entries. |
| bool rtems_filesystem_mount_iterate | ( | rtems_filesystem_mt_entry_visitor | visitor, |
| void * | visitor_arg | ||
| ) |
Iterates over all file system mount entries.
The iteration is protected by the IO library mutex. Do not mount or unmount file systems in the visitor function.
| [in] | visitor | For each file system mount entry the visitor function will be called with the entry and the visitor argument as parameters. |
| [in] | visitor_arg | The second parameter for the visitor function. |
| true | Iteration stopped due to visitor function return status. |
| false | Iteration through all entries. |
| int rtems_filesystem_register | ( | const char * | type, |
| rtems_filesystem_fsmount_me_t | mount_h | ||
| ) |
Registers a file system type.
The mount_h handler will be used to mount a file system of this type.
| 0 | Successful operation. |
| -1 | An error occurred. The errno indicates the error. |
| int rtems_filesystem_unregister | ( | const char * | type | ) |
Unregisters a file system type.
| 0 | Successful operation. |
| -1 | An error occurred. The errno indicates the error. |
| int unmount | ( | const char * | mount_path | ) |
Unmounts the file system at mount_path.
The function waits for the unmount process completion. In case the calling thread uses resources of the unmounted file system the function may never return. In case the calling thread has its root or current directory in the unmounted file system the function returns with an error status and errno is set to EBUSY.
The unmount process completion notification uses the transient event. It is a fatal error to terminate the calling thread while waiting for this event.
A concurrent unmount request for the same file system instance has unpredictable effects.
| 0 | Successful operation. |
| -1 | An error occurred. The errno indicates the error. |
Static table of file systems.
Externally defined by confdefs.h or the user.
1.7.5