RTEMS  5.1
Data Structures | Macros | Typedefs | Functions

Application Interface to FAT Filesystem. More...

#include <rtems.h>
#include <rtems/libio.h>

Go to the source code of this file.

Data Structures

struct  rtems_dosfs_convert_handler
 FAT filesystem convert handler. More...
 
struct  rtems_dosfs_buffer
 
struct  rtems_dosfs_convert_control
 FAT filesystem convert control. More...
 
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)
 

Typedefs

typedef struct rtems_dosfs_convert_control rtems_dosfs_convert_control
 
typedef int(* rtems_dosfs_utf8_to_codepage) (rtems_dosfs_convert_control *self, const uint8_t *src, size_t src_size, char *dst, size_t *dst_size)
 Converts from UTF-8 into a specific code page. More...
 
typedef int(* rtems_dosfs_codepage_to_utf8) (rtems_dosfs_convert_control *self, const char *src, size_t src_size, uint8_t *dst, size_t *dst_size)
 Converts from a specific code page into UTF-8. More...
 
typedef int(* rtems_dosfs_utf8_to_utf16) (rtems_dosfs_convert_control *self, const uint8_t *src, size_t src_size, uint16_t *dst, size_t *dst_size)
 Converts from UTF-8 to UTF-16. More...
 
typedef int(* rtems_dosfs_utf16_to_utf8) (rtems_dosfs_convert_control *self, const uint16_t *src, size_t src_size, uint8_t *dst, size_t *dst_size)
 Converts from UTF-16 to UTF-8. More...
 
typedef int(* rtems_dosfs_utf8_normalize_and_fold) (rtems_dosfs_convert_control *self, const uint8_t *src, size_t src_size, uint8_t *dst, size_t *dst_size)
 Converts from UTF-8 to Normalized Form Canonical Decomposition. More...
 
typedef void(* rtems_dosfs_convert_destroy) (rtems_dosfs_convert_control *self)
 Destroys a convert control structure. More...
 

Functions

rtems_dosfs_convert_controlrtems_dosfs_create_default_converter (void)
 Allocates and initializes a default converter. More...
 
rtems_dosfs_convert_controlrtems_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...
 
int rtems_dosfs_initialize (rtems_filesystem_mount_table_entry_t *mt_entry, const void *data)
 

Detailed Description

Application Interface to FAT Filesystem.

Typedef Documentation

◆ rtems_dosfs_codepage_to_utf8

typedef int(* rtems_dosfs_codepage_to_utf8) (rtems_dosfs_convert_control *self, const char *src, size_t src_size, uint8_t *dst, size_t *dst_size)

Converts from a specific code page into UTF-8.

Parameters
[in,out]selfThe convert control.
[in]srcA well-formed string in code page format.
[in]src_sizeThe size of the string in bytes (inludes '\0' if any).
[out]dstThe address the converted string will get copied to.
[in,out]dst_sizeThe size of the buffer in bytes respectively the number of bytes written to the buffer.
Return values
0Successful operation.
EINVALConversion was successful, but is not reversible.
ENOMEMConversion failed (possibly due to insufficient buffer size).

◆ rtems_dosfs_convert_destroy

typedef void(* rtems_dosfs_convert_destroy) (rtems_dosfs_convert_control *self)

Destroys a convert control structure.

Parameters
[in,out]selfThe convert control for destruction.

◆ rtems_dosfs_utf16_to_utf8

typedef int(* rtems_dosfs_utf16_to_utf8) (rtems_dosfs_convert_control *self, const uint16_t *src, size_t src_size, uint8_t *dst, size_t *dst_size)

Converts from UTF-16 to UTF-8.

Parameters
[in,out]selfThe convert control.
[in]srcA well-formed UTF-16 string to be converted.
[in]src_sizeThe size of the string in bytes (inludes '\0' if any).
[out]dstThe address the converted string will get copied to.
[in,out]dst_sizeThe size of the buffer in bytes respectively the number of bytes written to the buffer
Return values
0Successful operation.
EINVALConversion was successful, but is not reversible.
ENOMEMConversion failed (possibly due to insufficient buffer size).

◆ rtems_dosfs_utf8_normalize_and_fold

typedef int(* rtems_dosfs_utf8_normalize_and_fold) (rtems_dosfs_convert_control *self, const uint8_t *src, size_t src_size, uint8_t *dst, size_t *dst_size)

Converts from UTF-8 to Normalized Form Canonical Decomposition.

Does canonical decomposition of the UTF-8 string and in addition also converts upper case alphabetic characters to lower case characters

Parameters
[in,out]selfThe convert control.
[in]srcA well-formed UTF-8 string to be normalized and fold.
[in]src_sizeThe size of the string in bytes (inludes '\0' if any).
[out]dstThe address the normalized and fold string will get copied to.
[in,out]dst_sizeThe size of the buffer in bytes respectively the number of bytes written to the buffer.
Return values
0Successful operation.
EINVALConversion failed.
ENOMEMConversion failed (possibly due to insufficient buffer size).
EOVERFLOWConversion failed.
ENOENTConversion failed.

◆ rtems_dosfs_utf8_to_codepage

typedef int(* rtems_dosfs_utf8_to_codepage) (rtems_dosfs_convert_control *self, const uint8_t *src, size_t src_size, char *dst, size_t *dst_size)

Converts from UTF-8 into a specific code page.

Parameters
[in,out]selfThe convert control.
[in]srcA well-formed UTF-8 string to be converted.
[in]src_sizeThe size of the string in bytes (inludes '\0' if any).
[out]dstThe address the converted string will get copied to.
[in,out]dst_sizeThe size of the buffer in bytes respectively the number of bytes written to the buffer.
Return values
0Successful operation.
EINVALConversion was successful, but is not reversible.
ENOMEMConversion failed (possibly due to insufficient buffer size).

◆ rtems_dosfs_utf8_to_utf16

typedef int(* rtems_dosfs_utf8_to_utf16) (rtems_dosfs_convert_control *self, const uint8_t *src, size_t src_size, uint16_t *dst, size_t *dst_size)

Converts from UTF-8 to UTF-16.

Parameters
[in,out]selfThe convert control.
[in]srcA well-formed UTF-8 string to be converted.
[in]src_sizeThe size of the string in bytes (inludes '\0' if any).
[out]dstThe address the converted string will get copied to
[in,out]dst_sizeThe size of the buffer in bytes respectively the number of bytes written to the buffer.
Return values
0Successful operation.
EINVALConversion was successful, but is not reversible.
ENOMEMConversion failed (possibly due to insufficient buffer size).