RTEMS  5.0.0
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
libio_.h File Reference

LibIO Internal Interface. More...

#include <sys/uio.h>
#include <errno.h>
#include <limits.h>
#include <pthread.h>
#include <rtems.h>
#include <rtems/libio.h>
#include <rtems/seterr.h>
#include <rtems/score/assert.h>
#include <rtems/userenv.h>

Go to the source code of this file.

Data Structures

struct  rtems_filesystem_eval_path_generic_config
 

Macros

#define RTEMS_FILESYSTEM_SYMLOOP_MAX   32
 
#define F_DUP2FD   20
 
#define rtems_libio_iop_to_descriptor(_iop)   ((_iop) - &rtems_libio_iops[0])
 
#define rtems_libio_check_is_open(_iop)
 
#define LIBIO_GET_IOP(_fd, _iop)
 Macro to get the iop for the specified file descriptor. More...
 
#define LIBIO_GET_IOP_WITH_ACCESS(_fd, _iop, _access_flags, _access_error)
 Macro to get the iop for the specified file descriptor with access flags and error. More...
 
#define rtems_libio_check_buffer(_buffer)
 
#define rtems_libio_check_count(_count)
 
#define rtems_filesystem_mt_entry_declare_lock_context(ctx)   rtems_interrupt_lock_context ctx
 
#define rtems_filesystem_mt_entry_lock(ctx)   rtems_interrupt_lock_acquire( &rtems_filesystem_mt_entry_lock_control, &ctx )
 
#define rtems_filesystem_mt_entry_unlock(ctx)   rtems_interrupt_lock_release( &rtems_filesystem_mt_entry_lock_control, &ctx )
 

Typedefs

typedef bool(* rtems_filesystem_eval_path_is_directory) (rtems_filesystem_eval_path_context_t *ctx, void *arg)
 Tests if the current location is a directory. More...
 
typedef rtems_filesystem_eval_path_generic_status(* rtems_filesystem_eval_path_eval_token) (rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen)
 Evaluates a token. More...
 
typedef ssize_t(* rtems_libio_iovec_adapter) (rtems_libio_t *iop, const struct iovec *iov, int iovcnt, ssize_t total)
 

Enumerations

enum  rtems_filesystem_eval_path_generic_status { RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE, RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE, RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY }
 

Functions

void rtems_filesystem_location_clone (rtems_filesystem_location_info_t *clone, const rtems_filesystem_location_info_t *master)
 Clones a node. More...
 
void rtems_filesystem_location_free (rtems_filesystem_location_info_t *loc)
 Releases all resources of a location. More...
 
void rtems_libio_free_user_env (void *env)
 
void rtems_libio_lock (void)
 
void rtems_libio_unlock (void)
 
rtems_libio_trtems_libio_allocate (void)
 
unsigned int rtems_libio_fcntl_flags (int fcntl_flags)
 
int rtems_libio_to_fcntl_flags (unsigned int flags)
 
void rtems_libio_free (rtems_libio_t *iop)
 
rtems_filesystem_location_info_trtems_filesystem_eval_path_start (rtems_filesystem_eval_path_context_t *ctx, const char *path, int eval_flags)
 
rtems_filesystem_location_info_trtems_filesystem_eval_path_start_with_parent (rtems_filesystem_eval_path_context_t *ctx, const char *path, int eval_flags, rtems_filesystem_location_info_t *parentloc, int parent_eval_flags)
 
rtems_filesystem_location_info_trtems_filesystem_eval_path_start_with_root_and_current (rtems_filesystem_eval_path_context_t *ctx, const char *path, size_t pathlen, int eval_flags, rtems_filesystem_global_location_t *const *global_root_ptr, rtems_filesystem_global_location_t *const *global_current_ptr)
 
void rtems_filesystem_eval_path_continue (rtems_filesystem_eval_path_context_t *ctx)
 
void rtems_filesystem_eval_path_cleanup (rtems_filesystem_eval_path_context_t *ctx)
 
void rtems_filesystem_eval_path_recursive (rtems_filesystem_eval_path_context_t *ctx, const char *path, size_t pathlen)
 
void rtems_filesystem_eval_path_cleanup_with_parent (rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_location_info_t *parentloc)
 
void rtems_filesystem_eval_path_restart (rtems_filesystem_eval_path_context_t *ctx, rtems_filesystem_global_location_t **newstartloc_ptr)
 Requests a path evaluation restart. More...
 
void rtems_filesystem_eval_path_generic (rtems_filesystem_eval_path_context_t *ctx, void *arg, const rtems_filesystem_eval_path_generic_config *config)
 
void rtems_filesystem_initialize (void)
 Base File System Initialization. More...
 
rtems_filesystem_location_info_trtems_filesystem_location_copy (rtems_filesystem_location_info_t *dst, const rtems_filesystem_location_info_t *src)
 Copies a location. More...
 
rtems_filesystem_global_location_trtems_filesystem_location_transform_to_global (rtems_filesystem_location_info_t *loc)
 
void rtems_filesystem_global_location_assign (rtems_filesystem_global_location_t **lhs_global_loc_ptr, rtems_filesystem_global_location_t *rhs_global_loc)
 Assigns a global file system location. More...
 
rtems_filesystem_global_location_trtems_filesystem_global_location_obtain (rtems_filesystem_global_location_t *const *global_loc_ptr)
 Obtains a global file system location. More...
 
void rtems_filesystem_global_location_release (rtems_filesystem_global_location_t *global_loc, bool deferred)
 Releases a global file system location. More...
 
void rtems_filesystem_location_detach (rtems_filesystem_location_info_t *detach)
 
void rtems_filesystem_location_copy_and_detach (rtems_filesystem_location_info_t *copy, rtems_filesystem_location_info_t *detach)
 
int rtems_filesystem_mknod (const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, mode_t mode, dev_t dev)
 
int rtems_filesystem_chdir (rtems_filesystem_location_info_t *loc)
 
int rtems_filesystem_chmod (const rtems_filesystem_location_info_t *loc, mode_t mode)
 
int rtems_filesystem_chown (const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group)
 
void rtems_filesystem_location_remove_from_mt_entry (rtems_filesystem_location_info_t *loc)
 
void rtems_filesystem_do_unmount (rtems_filesystem_mount_table_entry_t *mt_entry)
 
void rtems_filesystem_eval_path_eat_delimiter (rtems_filesystem_eval_path_context_t *ctx)
 
void rtems_filesystem_eval_path_next_token (rtems_filesystem_eval_path_context_t *ctx)
 
void rtems_filesystem_eval_path_error (rtems_filesystem_eval_path_context_t *ctx, int eno)
 
int rtems_filesystem_location_exists_in_same_instance_as (const rtems_filesystem_location_info_t *a, const rtems_filesystem_location_info_t *b)
 Checks that the locations exist in the same file system instance. More...
 
bool rtems_filesystem_check_access (int flags, mode_t object_mode, uid_t object_uid, gid_t object_gid)
 Checks if access to an object is allowed for the current user. More...
 
bool rtems_filesystem_eval_path_check_access (rtems_filesystem_eval_path_context_t *ctx, int eval_flags, mode_t node_mode, uid_t node_uid, gid_t node_gid)
 

Variables

const uint32_t rtems_libio_number_iops
 
rtems_libio_t rtems_libio_iops []
 
void * rtems_libio_iop_free_head
 
void ** rtems_libio_iop_free_tail
 
const rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers
 
rtems_filesystem_mount_table_entry_t rtems_filesystem_null_mt_entry
 
rtems_filesystem_global_location_t rtems_filesystem_global_location_null
 The global null location. More...
 
pthread_key_t rtems_current_user_env_key
 
rtems_interrupt_lock rtems_filesystem_mt_entry_lock_control
 

Detailed Description

LibIO Internal Interface.

This file is the libio internal interface.