RTEMS  5.1
Modules | Files | Data Structures | Macros | Typedefs | Functions | Variables
IO Library

Provides system call and file system interface definitions. More...

Modules

 File System Node Handler
 File system node handler.
 
 File System Operations
 File system operations.
 
 File System Types and Mount
 File system types and mount.
 
 IMFS Generic Nodes
 Generic nodes are an alternative to standard drivers in RTEMS.
 
 IO Internal Library
 Internal IO library API and implementation.
 
 Media Manager
 Removable media support.
 
 Termios
 Termios.
 
 Untar Image
 
 User Environment
 Provides a POSIX like user environment for tasks.
 

Files

file  libio.h
 Basic IO API.
 
file  base_fs.c
 Base File System Initialization.
 
file  libio_exit.c
 
file  libio_init.c
 RTEMS LibIO Initialization.
 
file  mount-mktgt.c
 mount_and_make_target_path() implementation.
 
file  rtems_mkdir.c
 rtems_mkdir() implementation.
 
file  default_handlers.c
 rtems_filesystem_handlers_default definition.
 
file  default_ops.c
 rtems_filesystem_operations_default definition.
 

Data Structures

struct  rtems_filesystem_location_info_tt
 File system location. More...
 
struct  rtems_filesystem_global_location_t
 Global file system location. More...
 
struct  rtems_filesystem_limits_and_options_t
 Contain file system specific information which is required to support fpathconf(). More...
 
struct  rtems_libio_tt
 An open file data structure. More...
 
struct  rtems_libio_rw_args_t
 Paramameter block for read/write. More...
 
struct  rtems_libio_open_close_args_t
 Parameter block for open/close. More...
 
struct  rtems_libio_ioctl_args_t
 Parameter block for ioctl. More...
 
union  __rtems_dev_t
 

Macros

#define rtems_filesystem_split_dev_t(_dev, _major, _minor)
 

Typedefs

typedef struct rtems_filesystem_location_info_tt rtems_filesystem_location_info_t
 File system location.
 
typedef struct rtems_filesystem_global_location_t rtems_filesystem_global_location_t
 Global file system location. More...
 
typedef off_t rtems_off64_t __attribute__((deprecated))
 

Functions

rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler (const char *type)
 Gets the mount handler for the file system type. More...
 
void rtems_filesystem_initialize (void)
 Base File System Initialization. More...
 
void rtems_libio_post_driver (void)
 
void rtems_libio_exit (void)
 
int rtems_mkdir (const char *path, mode_t mode)
 Creates a directory and all its parent directories according to path. More...
 

Variables

const rtems_filesystem_limits_and_options_t rtems_filesystem_default_pathconf
 Default pathconf settings. More...
 

Flag Values

#define LIBIO_FLAGS_NO_DELAY   0x0001U /* return immediately if no data */
 
#define LIBIO_FLAGS_READ   0x0002U /* reading */
 
#define LIBIO_FLAGS_WRITE   0x0004U /* writing */
 
#define LIBIO_FLAGS_OPEN   0x0100U /* device is open */
 
#define LIBIO_FLAGS_APPEND   0x0200U /* all writes append */
 
#define LIBIO_FLAGS_CLOSE_ON_EXEC   0x0800U /* close on process exec() */
 
#define LIBIO_FLAGS_READ_WRITE   (LIBIO_FLAGS_READ | LIBIO_FLAGS_WRITE)
 
#define LIBIO_FLAGS_REFERENCE_INC   0x1000U
 

External I/O Handlers

typedef int(* rtems_libio_open_t) (const char *pathname, uint32_t flag, uint32_t mode)
 
typedef int(* rtems_libio_close_t) (int fd)
 
typedef ssize_t(* rtems_libio_read_t) (int fd, void *buffer, size_t count)
 
typedef ssize_t(* rtems_libio_write_t) (int fd, const void *buffer, size_t count)
 
typedef int(* rtems_libio_ioctl_t) (int fd, uint32_t command, void *buffer)
 
typedef off_t(* rtems_libio_lseek_t) (int fd, off_t offset, int whence)
 

Permission Macros

#define RTEMS_FS_PERMS_READ   0x4
 
#define RTEMS_FS_PERMS_WRITE   0x2
 
#define RTEMS_FS_PERMS_EXEC   0x1
 
#define RTEMS_FS_PERMS_RWX   (RTEMS_FS_PERMS_READ | RTEMS_FS_PERMS_WRITE | RTEMS_FS_PERMS_EXEC)
 
#define RTEMS_FS_FOLLOW_HARD_LINK   0x8
 
#define RTEMS_FS_FOLLOW_SYM_LINK   0x10
 
#define RTEMS_FS_FOLLOW_LINK   (RTEMS_FS_FOLLOW_HARD_LINK | RTEMS_FS_FOLLOW_SYM_LINK)
 
#define RTEMS_FS_MAKE   0x20
 
#define RTEMS_FS_EXCLUSIVE   0x40
 
#define RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS   0x80
 
#define RTEMS_FS_REJECT_TERMINAL_DOT   0x100
 

Detailed Description

Provides system call and file system interface definitions.

General purpose communication channel for RTEMS to allow UNIX/POSIX system call behavior under RTEMS. Initially this supported only IO to devices but has since been enhanced to support networking and support for mounted file systems.

Macro Definition Documentation

◆ rtems_filesystem_split_dev_t

#define rtems_filesystem_split_dev_t (   _dev,
  _major,
  _minor 
)
Value:
do { \
(_major) = rtems_filesystem_dev_major_t ( _dev ); \
(_minor) = rtems_filesystem_dev_minor_t( _dev ); \
} while(0)

Typedef Documentation

◆ rtems_filesystem_global_location_t

Global file system location.

The global file system locations are used for

  • the mount point location in the mount table entry,
  • the file system root location in the mount table entry,
  • the root directory location in the user environment, and
  • the current directory location in the user environment.

During the path evaluation global start locations are obtained to ensure that the current file system will be not unmounted in the meantime.

To support a release within critical sections of the operating system a deferred release is supported. This is similar to malloc() and free().

See also
rtems_filesystem_global_location_obtain() and rtems_filesystem_global_location_release().

Function Documentation

◆ rtems_filesystem_get_mount_handler()

rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler ( const char *  type)

Gets the mount handler for the file system type.

Returns
The file system mount handler associated with the type, or NULL if no such association exists.

◆ rtems_filesystem_initialize()

void rtems_filesystem_initialize ( void  )

Base File System Initialization.

Initialize the foundation of the file system. This is specified by the structure rtems_filesystem_mount_table. The usual configuration is a single instantiation of the IMFS or miniIMFS with a single "/dev" directory in it.

◆ rtems_mkdir()

int rtems_mkdir ( const char *  path,
mode_t  mode 
)

Creates a directory and all its parent directories according to path.

The mode value selects the access permissions of the directory.

Return values
0Successful operation.
-1An error occurred. The errno indicates the error.

Variable Documentation

◆ rtems_filesystem_default_pathconf

const rtems_filesystem_limits_and_options_t rtems_filesystem_default_pathconf

Default pathconf settings.

Override in a filesystem.