36 #ifndef _RTEMS_CONFDEFS_LIBIO_H 37 #define _RTEMS_CONFDEFS_LIBIO_H 39 #ifndef __CONFIGURATION_TEMPLATE_h 40 #error "Do not include this file directly, use <rtems/confdefs.h> instead" 47 #include <rtems/sysinit.h> 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 #ifdef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM 90 #ifdef CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM 91 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM" 94 #ifdef CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM 95 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM" 98 #ifdef CONFIGURE_FILESYSTEM_DOSFS 99 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_DOSFS" 102 #ifdef CONFIGURE_FILESYSTEM_FTPFS 103 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_FTPFS" 106 #ifdef CONFIGURE_FILESYSTEM_IMFS 107 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_IMFS" 110 #ifdef CONFIGURE_FILESYSTEM_JFFS2 111 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_JFFS2" 114 #ifdef CONFIGURE_FILESYSTEM_NFS 115 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_NFS" 118 #ifdef CONFIGURE_FILESYSTEM_RFS 119 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_RFS" 122 #ifdef CONFIGURE_FILESYSTEM_TFTPFS 123 #error "CONFIGURE_APPLICATION_DISABLE_FILESYSTEM cannot be used together with CONFIGURE_FILESYSTEM_TFTPFS" 129 #ifdef CONFIGURE_FILESYSTEM_DOSFS 133 #ifdef CONFIGURE_FILESYSTEM_FTPFS 137 #ifdef CONFIGURE_FILESYSTEM_JFFS2 138 #include <rtems/jffs2.h> 141 #ifdef CONFIGURE_FILESYSTEM_NFS 142 #include <librtemsNfs.h> 145 #ifdef CONFIGURE_FILESYSTEM_RFS 149 #ifdef CONFIGURE_FILESYSTEM_TFTPFS 150 #include <rtems/tftp.h> 157 #ifndef CONFIGURE_APPLICATION_DISABLE_FILESYSTEM 159 #ifndef CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK 160 #define CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK \ 161 IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK 164 #if CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 16 && \ 165 CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 32 && \ 166 CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 64 && \ 167 CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 128 && \ 168 CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 256 && \ 169 CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK != 512 170 #error "CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK must be a power of two between 16 and 512" 173 const int imfs_memfile_bytes_per_block = CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK;
180 #ifdef CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM 185 #ifdef CONFIGURE_IMFS_DISABLE_LINK 191 #ifdef CONFIGURE_IMFS_DISABLE_MKNOD 196 #ifdef CONFIGURE_IMFS_DISABLE_RMNOD 201 #ifdef CONFIGURE_IMFS_DISABLE_CHMOD 206 #ifdef CONFIGURE_IMFS_DISABLE_CHOWN 213 #ifdef CONFIGURE_IMFS_DISABLE_MOUNT 218 #ifdef CONFIGURE_IMFS_DISABLE_UNMOUNT 224 #ifdef CONFIGURE_IMFS_DISABLE_UTIME 229 #ifdef CONFIGURE_IMFS_DISABLE_SYMLINK 234 #ifdef CONFIGURE_IMFS_DISABLE_READLINK 239 #ifdef CONFIGURE_IMFS_DISABLE_RENAME 248 #ifdef CONFIGURE_IMFS_DISABLE_READDIR 249 &IMFS_mknod_control_dir_minimal,
251 &IMFS_mknod_control_dir_default,
253 #ifdef CONFIGURE_IMFS_DISABLE_MKNOD_DEVICE 254 &IMFS_mknod_control_enosys,
256 &IMFS_mknod_control_device,
258 #ifdef CONFIGURE_IMFS_DISABLE_MKNOD_FILE 259 &IMFS_mknod_control_enosys,
261 &IMFS_mknod_control_memfile,
263 #ifdef CONFIGURE_IMFS_ENABLE_MKFIFO 264 &IMFS_mknod_control_fifo
266 &IMFS_mknod_control_enosys
273 &IMFS_root_mknod_controls
277 {
"/", IMFS_initialize_support },
278 #ifdef CONFIGURE_FILESYSTEM_DOSFS 279 { RTEMS_FILESYSTEM_TYPE_DOSFS, rtems_dosfs_initialize },
281 #ifdef CONFIGURE_FILESYSTEM_FTPFS 284 #ifdef CONFIGURE_FILESYSTEM_IMFS 285 { RTEMS_FILESYSTEM_TYPE_IMFS, IMFS_initialize },
287 #ifdef CONFIGURE_FILESYSTEM_JFFS2 290 #ifdef CONFIGURE_FILESYSTEM_NFS 291 { RTEMS_FILESYSTEM_TYPE_NFS, rtems_nfs_initialize },
293 #ifdef CONFIGURE_FILESYSTEM_RFS 296 #ifdef CONFIGURE_FILESYSTEM_TFTPFS 297 { RTEMS_FILESYSTEM_TYPE_TFTPFS, rtems_tftpfs_initialize },
303 rtems_filesystem_root_configuration = {
307 RTEMS_FILESYSTEM_READ_WRITE,
308 &IMFS_root_mount_data
313 RTEMS_SYSINIT_ROOT_FILESYSTEM,
314 RTEMS_SYSINIT_ORDER_MIDDLE
319 #ifndef CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 320 #define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS 3 323 rtems_libio_t rtems_libio_iops[ CONFIGURE_MAXIMUM_FILE_DESCRIPTORS ];
325 const uint32_t rtems_libio_number_iops = RTEMS_ARRAY_SIZE( rtems_libio_iops );
void rtems_filesystem_initialize(void)
Base File System Initialization.
Definition: base_fs.c:32
int rtems_filesystem_default_utime(const rtems_filesystem_location_info_t *loc, time_t actime, time_t modtime)
Definition: default_utime.c:25
RFS File system Initialization.
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:29
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:23
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:26
Header File for the In-Memory File System.
const rtems_filesystem_table_t rtems_filesystem_table[]
Static table of file systems.
int rtems_filesystem_default_unmount(rtems_filesystem_mount_table_entry_t *mt_entry)
Definition: default_unmount.c:22
int IMFS_mount(rtems_filesystem_mount_table_entry_t *mt_entry)
Mount an IMFS.
Definition: imfs_mount.c:27
void IMFS_node_free(const rtems_filesystem_location_info_t *loc)
Free an IMFS node.
Definition: imfs_node.c:88
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:36
File system table entry.
Definition: libio.h:1656
ssize_t rtems_filesystem_default_readlink(const rtems_filesystem_location_info_t *loc, char *buf, size_t bufsize)
Definition: default_readlink.c:25
int rtems_rfs_rtems_initialise(rtems_filesystem_mount_table_entry_t *mt_entry, const void *data)
Definition: rtems-rfs-rtems.c:750
int rtems_filesystem_default_fchmod(const rtems_filesystem_location_info_t *loc, mode_t mode)
Definition: default_fchmod.c:23
void IMFS_eval_path(rtems_filesystem_eval_path_context_t *ctx)
IMFS evaluation node support.
Definition: imfs_eval.c:176
int IMFS_node_clone(rtems_filesystem_location_info_t *loc)
Clone an IMFS node.
Definition: imfs_node.c:72
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:25
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:44
int rtems_filesystem_default_rmnod(const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *loc)
Definition: default_rmnod.c:25
int IMFS_fchmod(const rtems_filesystem_location_info_t *loc, mode_t mode)
Change the IMFS file mode.
Definition: imfs_fchmod.c:24
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:28
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:28
Application Interface to FAT Filesystem.
int IMFS_unmount(rtems_filesystem_mount_table_entry_t *mt_entry)
Unmount an IMFS.
Definition: imfs_unmount.c:27
File system operations table.
Definition: libio.h:472
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:27
int rtems_filesystem_default_mount(rtems_filesystem_mount_table_entry_t *mt_entry)
Definition: default_mount.c:22
Evaluate BSP Related Configuration Options.
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:57
File Transfer Protocol file system (FTP client).
int IMFS_utime(const rtems_filesystem_location_info_t *loc, time_t actime, time_t modtime)
Set IMFS file access and modification times.
Definition: imfs_utime.c:26
void rtems_filesystem_default_fsunmount(rtems_filesystem_mount_table_entry_t *mt_entry)
Definition: default_fsunmount.c:20
int rtems_filesystem_default_statvfs(const rtems_filesystem_location_info_t *loc, struct statvfs *buf)
Definition: default_statvfs.c:23
An open file data structure.
Definition: libio.h:1320
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:25
void IMFS_eval_path_devfs(rtems_filesystem_eval_path_context_t *ctx)
IMFS device filesystem evaluation node support.
Definition: imfs_eval_devfs.c:123
int rtems_ftpfs_initialize(rtems_filesystem_mount_table_entry_t *mt_entry, const void *data)
Do not call directly, use mount().
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:25
int rtems_filesystem_default_chown(const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group)
Definition: default_chown.c:23
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:29
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:50
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77
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:1216