RTEMS
5.0.0
|
FAT file system configuration support, format and mount options. More...
Files | |
file | dosfs.h |
Application Interface to FAT Filesystem. | |
file | msdos_conv_default.c |
Default Converter. | |
file | msdos_conv_utf8.c |
UTF-8 Converter. | |
Data Structures | |
struct | rtems_dosfs_mount_options |
FAT filesystem mount options. More... | |
struct | msdos_format_request_param_t |
FAT file system format request parameters. More... | |
Macros | |
#define | RTEMS_DOSFS_SEMAPHORES_PER_INSTANCE 1 |
Semaphore count per FAT filesystem instance. More... | |
#define | MSDOS_FMT_INFO_LEVEL_NONE (0) |
#define | MSDOS_FMT_INFO_LEVEL_INFO (1) |
#define | MSDOS_FMT_INFO_LEVEL_DETAIL (2) |
#define | MSDOS_FMT_INFO_LEVEL_DEBUG (3) |
Functions | |
rtems_dosfs_convert_control * | rtems_dosfs_create_default_converter (void) |
Allocates and initializes a default converter. More... | |
rtems_dosfs_convert_control * | rtems_dosfs_create_utf8_converter (const char *codepage) |
Allocates and initializes a UTF-8 converter. More... | |
int | msdos_format (const char *devname, const msdos_format_request_param_t *rqdata) |
Formats a block device with a FAT file system. More... | |
FAT file system configuration support, format and mount options.
A block device can be formatted with a FAT file system with the msdos_format() function.
The FAT file system mount operation can be controlled with FAT file system specific mount options, see rtems_dosfs_mount_options.
#define RTEMS_DOSFS_SEMAPHORES_PER_INSTANCE 1 |
Semaphore count per FAT filesystem instance.
This can be used for system configuration via <rtems/confdefs.h>.
int msdos_format | ( | const char * | devname, |
const msdos_format_request_param_t * | rqdata | ||
) |
Formats a block device with a FAT file system.
[in] | devname | The block device path. |
[in] | rqdata | The FAT file system format request data. Use NULL for default parameters. |
0 | Successful operation. |
-1 | An error occurred. The errno indicates the error. |
rtems_dosfs_convert_control* rtems_dosfs_create_default_converter | ( | void | ) |
Allocates and initializes a default converter.
This default converter will accept only POSIX file names with pure ASCII characters. This largely corresponds to the file name handling before the optional UTF-8 support was added to the RTEMS implementation of the FAT file system. This handling is mostly backwards compatible to the previous RTEMS implementation of the FAT file system.
For backwards compatibility and the previous RTEMS implementation of the FAT file system please see also rtems_dosfs_mount_options and mount().
NULL | Something failed. |
other | Pointer to initialized converter. |
rtems_dosfs_convert_control* rtems_dosfs_create_utf8_converter | ( | const char * | codepage | ) |
Allocates and initializes a UTF-8 converter.
This converter will assume that all file names passed to POSIX file handling methods are UTF-8 strings and will convert them to the selected code page for short file names and to UTF-16 for long file names. This conversion will be done during reading and writing. These conversions correspond to the specification of the FAT file system. This handling is mostly backwards compatible to the previous RTEMS implementation of the FAT file system.
For backwards compatibility and the previous RTEMS implementation of the FAT file system please see also rtems_dosfs_mount_options and mount().
One possible issue with this converter is: When reading file names which have been created with other implementations of the FAT file system, it can happen that during the conversion to UTF-8 a long file name becomes longer and exceeds the 255 bytes limit. In such a case only the short file name will get read.
[in] | codepage | The iconv() identification string for the used code page. |
NULL | Something failed. |
other | Pointer to initialized converter. |