37#ifndef _RTEMS_CONFDEFS_LIBIO_H
38#define _RTEMS_CONFDEFS_LIBIO_H
40#ifndef __CONFIGURATION_TEMPLATE_h
41#error "Do not include this file directly, use <rtems/confdefs.h> instead"
49#ifdef CONFIGURE_FILESYSTEM_ALL
50 #define CONFIGURE_FILESYSTEM_DOSFS
51 #define CONFIGURE_FILESYSTEM_FTPFS
52 #define CONFIGURE_FILESYSTEM_IMFS
53 #define CONFIGURE_FILESYSTEM_JFFS2
54 #define CONFIGURE_FILESYSTEM_NFS
55 #define CONFIGURE_FILESYSTEM_RFS
56 #define CONFIGURE_FILESYSTEM_TFTPFS
59#ifdef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
60 #ifdef CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
61 #error "CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM cannot be used together with CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM"
64 #define CONFIGURE_IMFS_DISABLE_CHMOD
65 #define CONFIGURE_IMFS_DISABLE_CHOWN
66 #define CONFIGURE_IMFS_DISABLE_LINK
67 #define CONFIGURE_IMFS_DISABLE_READLINK
68 #define CONFIGURE_IMFS_DISABLE_RENAME
69 #define CONFIGURE_IMFS_DISABLE_SYMLINK
70 #define CONFIGURE_IMFS_DISABLE_UNMOUNT
71 #define CONFIGURE_IMFS_DISABLE_UTIME
74#ifdef CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
75 #define CONFIGURE_IMFS_DISABLE_CHMOD
76 #define CONFIGURE_IMFS_DISABLE_CHOWN
77 #define CONFIGURE_IMFS_DISABLE_LINK
78 #define CONFIGURE_IMFS_DISABLE_MKNOD_FILE
79 #define CONFIGURE_IMFS_DISABLE_MOUNT
80 #define CONFIGURE_IMFS_DISABLE_READDIR
81 #define CONFIGURE_IMFS_DISABLE_READLINK
82 #define CONFIGURE_IMFS_DISABLE_RENAME
83 #define CONFIGURE_IMFS_DISABLE_RMNOD
84 #define CONFIGURE_IMFS_DISABLE_SYMLINK
85 #define CONFIGURE_IMFS_DISABLE_UNMOUNT
86 #define CONFIGURE_IMFS_DISABLE_UTIME
89#ifndef CONFIGURE_MAXIMUM_FILE_DESCRIPTORS
90 #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 3
93#if !defined(CONFIGURE_APPLICATION_DISABLE_FILESYSTEM) || \
94 CONFIGURE_MAXIMUM_FILE_DESCRIPTORS > 0
98#ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
99 #ifdef CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
100 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM"
103 #ifdef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
104 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM"
107 #ifdef CONFIGURE_FILESYSTEM_DOSFS
108 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_DOSFS"
111 #ifdef CONFIGURE_FILESYSTEM_FTPFS
112 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_FTPFS"
115 #ifdef CONFIGURE_FILESYSTEM_IMFS
116 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_IMFS"
119 #ifdef CONFIGURE_FILESYSTEM_JFFS2
120 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_JFFS2"
123 #ifdef CONFIGURE_FILESYSTEM_NFS
124 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_NFS"
127 #ifdef CONFIGURE_FILESYSTEM_RFS
128 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_RFS"
131 #ifdef CONFIGURE_FILESYSTEM_TFTPFS
132 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_TFTPFS"
138#ifdef CONFIGURE_FILESYSTEM_DOSFS
142#ifdef CONFIGURE_FILESYSTEM_FTPFS
146#ifdef CONFIGURE_FILESYSTEM_JFFS2
147#include <rtems/jffs2.h>
149#ifndef CONFIGURE_JFFS2_DELAYED_WRITE_TASK_PRIORITY
150 #define CONFIGURE_JFFS2_DELAYED_WRITE_TASK_PRIORITY \
151 RTEMS_JFFS2_DELAYED_WRITE_TASK_PRIORITY_DEFAULT
160#ifdef CONFIGURE_FILESYSTEM_NFS
161#include <librtemsNfs.h>
164#ifdef CONFIGURE_FILESYSTEM_RFS
168#ifdef CONFIGURE_FILESYSTEM_TFTPFS
176#ifndef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM
178#ifndef CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
179 #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK \
180 IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK
183#if CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 16 && \
184 CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 32 && \
185 CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 64 && \
186 CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 128 && \
187 CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 256 && \
188 CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 512
189 #error "CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK must be a power of two between 16 and 512"
199 #ifdef CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
204 #ifdef CONFIGURE_IMFS_DISABLE_LINK
210 #ifdef CONFIGURE_IMFS_DISABLE_MKNOD
215 #ifdef CONFIGURE_IMFS_DISABLE_RMNOD
220 #ifdef CONFIGURE_IMFS_DISABLE_CHMOD
225 #ifdef CONFIGURE_IMFS_DISABLE_CHOWN
232 #ifdef CONFIGURE_IMFS_DISABLE_MOUNT
237 #ifdef CONFIGURE_IMFS_DISABLE_UNMOUNT
243 #ifdef CONFIGURE_IMFS_DISABLE_UTIME
248 #ifdef CONFIGURE_IMFS_DISABLE_SYMLINK
253 #ifdef CONFIGURE_IMFS_DISABLE_READLINK
258 #ifdef CONFIGURE_IMFS_DISABLE_RENAME
267 #ifdef CONFIGURE_IMFS_DISABLE_READDIR
268 &IMFS_mknod_control_dir_minimal,
270 &IMFS_mknod_control_dir_default,
272 #ifdef CONFIGURE_IMFS_DISABLE_MKNOD_DEVICE
273 &IMFS_mknod_control_enosys,
275 &IMFS_mknod_control_device,
277 #ifdef CONFIGURE_IMFS_DISABLE_MKNOD_FILE
278 &IMFS_mknod_control_enosys,
280 &IMFS_mknod_control_memfile,
282 #ifdef CONFIGURE_IMFS_ENABLE_MKFIFO
283 &IMFS_mknod_control_fifo
285 &IMFS_mknod_control_enosys
292 &IMFS_root_mknod_controls
296 {
"/", IMFS_initialize_support },
297 #ifdef CONFIGURE_FILESYSTEM_DOSFS
298 { RTEMS_FILESYSTEM_TYPE_DOSFS, rtems_dosfs_initialize },
300 #ifdef CONFIGURE_FILESYSTEM_FTPFS
303 #ifdef CONFIGURE_FILESYSTEM_IMFS
304 { RTEMS_FILESYSTEM_TYPE_IMFS, IMFS_initialize },
306 #ifdef CONFIGURE_FILESYSTEM_JFFS2
309 #ifdef CONFIGURE_FILESYSTEM_NFS
310 { RTEMS_FILESYSTEM_TYPE_NFS, rtems_nfs_initialize },
312 #ifdef CONFIGURE_FILESYSTEM_RFS
315 #ifdef CONFIGURE_FILESYSTEM_TFTPFS
322rtems_filesystem_root_configuration = {
326 RTEMS_FILESYSTEM_READ_WRITE,
327 &IMFS_root_mount_data
332 RTEMS_SYSINIT_ROOT_FILESYSTEM,
333 RTEMS_SYSINIT_ORDER_MIDDLE
338#if CONFIGURE_MAXIMUM_FILE_DESCRIPTORS > 0
341 const uint32_t rtems_libio_number_iops =
RTEMS_ARRAY_SIZE( rtems_libio_iops );
This header file evaluates configuration options related to the BSP configuration.
Application Interface to FAT Filesystem.
File Transfer Protocol file system (FTP client).
int rtems_ftpfs_initialize(rtems_filesystem_mount_table_entry_t *mt_entry, const void *data)
Do not call directly, use mount().
Definition: ftpfs.c:1266
const rtems_filesystem_table_t rtems_filesystem_table[]
Static table of file systems.
int IMFS_chown(const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group)
Change the owner of IMFS.
Definition: imfs_chown.c:47
int IMFS_rmnod(const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *loc)
IMFS node removal handler.
Definition: imfs_rmnod.c:46
int IMFS_link(const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *targetloc, const char *name, size_t namelen)
Create a new IMFS link node.
Definition: imfs_link.c:45
int IMFS_rename(const rtems_filesystem_location_info_t *oldparentloc, const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen)
Rename the IMFS.
Definition: imfs_rename.c:69
void IMFS_node_free(const rtems_filesystem_location_info_t *loc)
Free an IMFS node.
Definition: imfs_node.c:107
int IMFS_unmount(rtems_filesystem_mount_table_entry_t *mt_entry)
Unmount an IMFS.
Definition: imfs_unmount.c:46
int IMFS_symlink(const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, const char *target)
Create a new IMFS symbolic link node.
Definition: imfs_symlink.c:47
int IMFS_node_clone(rtems_filesystem_location_info_t *loc)
Clone an IMFS node.
Definition: imfs_node.c:91
int IMFS_mount(rtems_filesystem_mount_table_entry_t *mt_entry)
Mount an IMFS.
Definition: imfs_mount.c:46
int IMFS_utimens(const rtems_filesystem_location_info_t *loc, struct timespec times[2])
Set IMFS file access and modification times.
Definition: imfs_utimens.c:44
int IMFS_mknod(const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, mode_t mode, dev_t dev)
Create an IMFS node.
Definition: imfs_mknod.c:63
void IMFS_eval_path(rtems_filesystem_eval_path_context_t *ctx)
IMFS evaluation node support.
Definition: imfs_eval.c:195
ssize_t IMFS_readlink(const rtems_filesystem_location_info_t *loc, char *buf, size_t bufsize)
Put IMFS symbolic link into buffer.
Definition: imfs_symlink.c:76
int IMFS_fchmod(const rtems_filesystem_location_info_t *loc, mode_t mode)
Change the IMFS file mode.
Definition: imfs_fchmod.c:43
void IMFS_eval_path_devfs(rtems_filesystem_eval_path_context_t *ctx)
IMFS device filesystem evaluation node support.
Definition: imfs_eval_devfs.c:123
const rtems_jffs2_config jffs2_config
int rtems_jffs2_initialize(rtems_filesystem_mount_table_entry_t *mt_entry, const void *data)
Initialization handler of the JFFS2 file system.
Definition: fs-rtems.c:1359
int rtems_filesystem_default_unmount(rtems_filesystem_mount_table_entry_t *mt_entry)
Definition: default_unmount.c:41
void rtems_filesystem_default_lock(const rtems_filesystem_mount_table_entry_t *mt_entry)
Obtains the IO library mutex.
Definition: default_lock_and_unlock.c:42
int rtems_filesystem_default_rename(const rtems_filesystem_location_info_t *oldparentloc, const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen)
Definition: default_rename.c:44
int rtems_filesystem_default_mknod(const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, mode_t mode, dev_t dev)
Definition: default_mknod.c:44
int rtems_filesystem_default_fchmod(const rtems_filesystem_location_info_t *loc, mode_t mode)
Definition: default_fchmod.c:42
void rtems_filesystem_default_unlock(const rtems_filesystem_mount_table_entry_t *mt_entry)
Releases the IO library mutex.
Definition: default_lock_and_unlock.c:49
bool rtems_filesystem_default_are_nodes_equal(const rtems_filesystem_location_info_t *a, const rtems_filesystem_location_info_t *b)
Tests if the node access pointer of one location is equal to the node access pointer of the other loc...
Definition: default_are_nodes_equal.c:42
int rtems_filesystem_default_rmnod(const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *loc)
Definition: default_rmnod.c:44
int rtems_filesystem_default_mount(rtems_filesystem_mount_table_entry_t *mt_entry)
Definition: default_mount.c:41
void rtems_filesystem_default_fsunmount(rtems_filesystem_mount_table_entry_t *mt_entry)
Definition: default_fsunmount.c:39
int rtems_filesystem_default_symlink(const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, const char *target)
Definition: default_symlink.c:44
int rtems_filesystem_default_statvfs(const rtems_filesystem_location_info_t *loc, struct statvfs *buf)
Definition: default_statvfs.c:42
int rtems_filesystem_default_chown(const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group)
Definition: default_chown.c:42
ssize_t rtems_filesystem_default_readlink(const rtems_filesystem_location_info_t *loc, char *buf, size_t bufsize)
Definition: default_readlink.c:44
int rtems_filesystem_default_link(const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *targetloc, const char *name, size_t namelen)
Definition: default_link.c:42
int rtems_filesystem_default_utimens(const rtems_filesystem_location_info_t *loc, struct timespec times[2])
Definition: default_utimens.c:43
void rtems_filesystem_initialize(void)
Base File System Initialization.
Definition: base_fs.c:51
#define RTEMS_ARRAY_SIZE(_array)
Gets the element count of the array.
Definition: basedefs.h:244
#define RTEMS_SYSINIT_ITEM(handler, module, order)
Creates the system initialization item associated with the handler, module, and order.
Definition: sysinit.h:204
#define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
This configuration option is an integer define.
Definition: appl-config.h:2476
#define CONFIGURE_JFFS2_DELAYED_WRITE_TASK_PRIORITY
This configuration option is an integer define.
Definition: appl-config.h:2504
#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS
This configuration option is an integer define.
Definition: appl-config.h:2918
int rtems_tftpfs_initialize(rtems_filesystem_mount_table_entry_t *mt_entry, const void *data)
Do not call directly, use mount().
Definition: tftpfs.c:150
#define NULL
Requests a GPIO pin group configuration.
Definition: xil_types.h:54
int rtems_rfs_rtems_initialise(rtems_filesystem_mount_table_entry_t *mt_entry, const void *data)
Definition: rtems-rfs-rtems.c:767
This header file defines the API of the In-Memory File System.
RFS File system Initialization.
File system operations table.
Definition: libio.h:489
File system table entry.
Definition: libio.h:1675
An open file data structure.
Definition: libio.h:1338
This header file provides the API of the System Initialization Support.
This header file provides interfaces and functions used to implement the TFTP file system.