|
RTEMS CPU Kit with SuperCore
4.10.99.0
|
File system node handler. More...
|
Data Structures | |
| struct | _rtems_filesystem_file_handlers_r |
| File system node operations table. More... | |
Typedefs | |
| typedef int(* | rtems_filesystem_open_t )(rtems_libio_t *iop, const char *path, int oflag, mode_t mode) |
| Opens a node. | |
| typedef int(* | rtems_filesystem_close_t )(rtems_libio_t *iop) |
| Closes a node. | |
| typedef ssize_t(* | rtems_filesystem_read_t )(rtems_libio_t *iop, void *buffer, size_t count) |
| Reads from a node. | |
| typedef ssize_t(* | rtems_filesystem_write_t )(rtems_libio_t *iop, const void *buffer, size_t count) |
| Writes to a node. | |
| typedef int(* | rtems_filesystem_ioctl_t )(rtems_libio_t *iop, ioctl_command_t request, void *buffer) |
| IO control of a node. | |
| typedef off_t(* | rtems_filesystem_lseek_t )(rtems_libio_t *iop, off_t offset, int whence) |
| Moves the read/write file offset. | |
| typedef int(* | rtems_filesystem_fstat_t )(const rtems_filesystem_location_info_t *loc, struct stat *buf) |
| Gets a node status. | |
| typedef int(* | rtems_filesystem_ftruncate_t )(rtems_libio_t *iop, off_t length) |
| Truncates a file to a specified length. | |
| typedef int(* | rtems_filesystem_fsync_t )(rtems_libio_t *iop) |
| Synchronizes changes to a file. | |
| typedef int(* | rtems_filesystem_fdatasync_t )(rtems_libio_t *iop) |
| Synchronizes the data of a file. | |
| typedef int(* | rtems_filesystem_fcntl_t )(rtems_libio_t *iop, int cmd) |
| File control. | |
Functions | |
| int | rtems_filesystem_default_open (rtems_libio_t *iop, const char *path, int oflag, mode_t mode) |
| int | rtems_filesystem_default_close (rtems_libio_t *iop) |
| ssize_t | rtems_filesystem_default_read (rtems_libio_t *iop, void *buffer, size_t count) |
| ssize_t | rtems_filesystem_default_write (rtems_libio_t *iop, const void *buffer, size_t count) |
| int | rtems_filesystem_default_ioctl (rtems_libio_t *iop, ioctl_command_t request, void *buffer) |
| off_t | rtems_filesystem_default_lseek (rtems_libio_t *iop, off_t offset, int whence) |
| off_t | rtems_filesystem_default_lseek_directory (rtems_libio_t *iop, off_t offset, int whence) |
| An offset 0 with a whence of SEEK_SET will perform a directory rewind operation. | |
| off_t | rtems_filesystem_default_lseek_file (rtems_libio_t *iop, off_t offset, int whence) |
| Default lseek() handler for files. | |
| int | rtems_filesystem_default_fstat (const rtems_filesystem_location_info_t *loc, struct stat *buf) |
| Sets the mode to S_IRWXU | S_IRWXG | S_IRWXO. | |
| int | rtems_filesystem_default_ftruncate (rtems_libio_t *iop, off_t length) |
| int | rtems_filesystem_default_ftruncate_directory (rtems_libio_t *iop, off_t length) |
| int | rtems_filesystem_default_fsync_or_fdatasync (rtems_libio_t *iop) |
| int | rtems_filesystem_default_fsync_or_fdatasync_success (rtems_libio_t *iop) |
| int | rtems_filesystem_default_fcntl (rtems_libio_t *iop, int cmd) |
Variables | |
|
const rtems_filesystem_file_handlers_r | rtems_filesystem_handlers_default |
| File system node handler table with default node handlers. | |
File system node handler.
| typedef int(* rtems_filesystem_close_t)(rtems_libio_t *iop) |
Closes a node.
| [in,out] | iop | The IO pointer. |
| 0 | Successful operation. |
| -1 | An error occurred. The errno is set to indicate the error. |
| typedef int(* rtems_filesystem_fcntl_t)(rtems_libio_t *iop, int cmd) |
File control.
| [in,out] | iop | The IO pointer. |
| [in] | cmd | Control command. |
| 0 | Successful operation. |
| errno | An error occurred. This value is assigned to errno. |
| typedef int(* rtems_filesystem_fdatasync_t)(rtems_libio_t *iop) |
Synchronizes the data of a file.
| [in,out] | iop | The IO pointer. |
| 0 | Successful operation. |
| -1 | An error occurred. The errno is set to indicate the error. |
| typedef int(* rtems_filesystem_fstat_t)(const rtems_filesystem_location_info_t *loc, struct stat *buf) |
Gets a node status.
| [in,out] | iop | The IO pointer. |
| [out] | stat | The buffer to status information. |
| 0 | Successful operation. |
| -1 | An error occurred. The errno is set to indicate the error. |
| typedef int(* rtems_filesystem_fsync_t)(rtems_libio_t *iop) |
Synchronizes changes to a file.
| [in,out] | iop | The IO pointer. |
| 0 | Successful operation. |
| -1 | An error occurred. The errno is set to indicate the error. |
| typedef int(* rtems_filesystem_ftruncate_t)(rtems_libio_t *iop, off_t length) |
Truncates a file to a specified length.
| [in,out] | iop | The IO pointer. |
| [in] | length | The new length in characters. |
| 0 | Successful operation. |
| -1 | An error occurred. The errno is set to indicate the error. |
| typedef int(* rtems_filesystem_ioctl_t)(rtems_libio_t *iop, ioctl_command_t request, void *buffer) |
IO control of a node.
| [in,out] | iop | The IO pointer. |
| [in] | request | The IO control request. |
| [in,out] | buffer | The buffer for IO control request data. |
| 0 | Successful operation. |
| -1 | An error occurred. The errno is set to indicate the error. |
| typedef off_t(* rtems_filesystem_lseek_t)(rtems_libio_t *iop, off_t offset, int whence) |
Moves the read/write file offset.
| [in,out] | iop | The IO pointer. |
| [in] | offset | The offset. |
| [in] | whence | The reference position for the offset. |
| non-negative | The new offset from the beginning of the file. |
| -1 | An error occurred. The errno is set to indicate the error. |
| typedef int(* rtems_filesystem_open_t)(rtems_libio_t *iop, const char *path, int oflag, mode_t mode) |
Opens a node.
| [in,out] | iop | The IO pointer. |
| [in] | path | The path. |
| [in] | oflag | The open flags. |
| [in] | mode | Optional mode for node creation. |
| 0 | Successful operation. |
| -1 | An error occurred. The errno is set to indicate the error. |
| typedef ssize_t(* rtems_filesystem_read_t)(rtems_libio_t *iop, void *buffer, size_t count) |
Reads from a node.
This handler is responsible to update the offset field of the IO descriptor.
| [in,out] | iop | The IO pointer. |
| [out] | buffer | The buffer for read data. |
| [in] | count | The size of the buffer in characters. |
| non-negative | Count of read characters. |
| -1 | An error occurred. The errno is set to indicate the error. |
| typedef ssize_t(* rtems_filesystem_write_t)(rtems_libio_t *iop, const void *buffer, size_t count) |
Writes to a node.
This handler is responsible to update the offset field of the IO descriptor.
| [in,out] | iop | The IO pointer. |
| [out] | buffer | The buffer for write data. |
| [in] | count | The size of the buffer in characters. |
| non-negative | Count of written characters. |
| -1 | An error occurred. The errno is set to indicate the error. |
| int rtems_filesystem_default_close | ( | rtems_libio_t * | iop | ) |
| 0 | Always. |
| int rtems_filesystem_default_fcntl | ( | rtems_libio_t * | iop, |
| int | cmd | ||
| ) |
| 0 | Always. |
| int rtems_filesystem_default_fstat | ( | const rtems_filesystem_location_info_t * | loc, |
| struct stat * | buf | ||
| ) |
Sets the mode to S_IRWXU | S_IRWXG | S_IRWXO.
| 0 | Always. |
| int rtems_filesystem_default_fsync_or_fdatasync | ( | rtems_libio_t * | iop | ) |
| -1 | Always. The errno is set to EINVAL. |
| int rtems_filesystem_default_fsync_or_fdatasync_success | ( | rtems_libio_t * | iop | ) |
| 0 | Always. |
| int rtems_filesystem_default_ftruncate | ( | rtems_libio_t * | iop, |
| off_t | length | ||
| ) |
| -1 | Always. The errno is set to ENOTSUP. |
| int rtems_filesystem_default_ftruncate_directory | ( | rtems_libio_t * | iop, |
| off_t | length | ||
| ) |
| -1 | Always. The errno is set to EISDIR. |
| int rtems_filesystem_default_ioctl | ( | rtems_libio_t * | iop, |
| ioctl_command_t | request, | ||
| void * | buffer | ||
| ) |
| -1 | Always. The errno is set to ENOTSUP. |
| off_t rtems_filesystem_default_lseek | ( | rtems_libio_t * | iop, |
| off_t | offset, | ||
| int | whence | ||
| ) |
| -1 | Always. The errno is set to ESPIPE. |
| off_t rtems_filesystem_default_lseek_directory | ( | rtems_libio_t * | iop, |
| off_t | offset, | ||
| int | whence | ||
| ) |
An offset 0 with a whence of SEEK_SET will perform a directory rewind operation.
This function has no protection against concurrent access.
| -1 | The offset is not zero or the whence is not SEEK_SET. |
| 0 | Successful rewind operation. |
| off_t rtems_filesystem_default_lseek_file | ( | rtems_libio_t * | iop, |
| off_t | offset, | ||
| int | whence | ||
| ) |
Default lseek() handler for files.
The fstat() handler will be used to obtain the file size in case whence is SEEK_END.
This function has no protection against concurrent access.
| -1 | An error occurred. In case an integer overflow occurred, then the errno will be set to EOVERFLOW. In case the new offset is negative, then the errno will be set to EINVAL. In case the whence is SEEK_END and the fstat() handler to obtain the current file size returned an error status, then the errno will be set by the fstat() handler. |
| offset | The new offset. |
| int rtems_filesystem_default_open | ( | rtems_libio_t * | iop, |
| const char * | path, | ||
| int | oflag, | ||
| mode_t | mode | ||
| ) |
| 0 | Always. |
| ssize_t rtems_filesystem_default_read | ( | rtems_libio_t * | iop, |
| void * | buffer, | ||
| size_t | count | ||
| ) |
| -1 | Always. The errno is set to ENOTSUP. |
| ssize_t rtems_filesystem_default_write | ( | rtems_libio_t * | iop, |
| const void * | buffer, | ||
| size_t | count | ||
| ) |
| -1 | Always. The errno is set to ENOTSUP. |
1.7.5