mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-06 15:43:15 +00:00
2010-05-31 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/include/rtems/libio.h: Remove if 0 section. Formatting.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2010-05-31 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* libcsupport/include/rtems/libio.h: Remove if 0 section. Formatting.
|
||||||
|
|
||||||
2010-05-31 Chris Johns <chrisj@rtems.org>
|
2010-05-31 Chris Johns <chrisj@rtems.org>
|
||||||
|
|
||||||
* libcsupport/Makefile.am: Add mount-mgr.c.
|
* libcsupport/Makefile.am: Add mount-mgr.c.
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ typedef _off64_t rtems_off64_t;
|
|||||||
/*
|
/*
|
||||||
* Valid RTEMS file types.
|
* Valid RTEMS file types.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define RTEMS_FILESYSTEM_DIRECTORY 1
|
#define RTEMS_FILESYSTEM_DIRECTORY 1
|
||||||
#define RTEMS_FILESYSTEM_DEVICE 2
|
#define RTEMS_FILESYSTEM_DEVICE 2
|
||||||
#define RTEMS_FILESYSTEM_HARD_LINK 3
|
#define RTEMS_FILESYSTEM_HARD_LINK 3
|
||||||
@@ -59,7 +58,6 @@ typedef int rtems_filesystem_node_types_t;
|
|||||||
/*
|
/*
|
||||||
* File Handler Operations Table
|
* File Handler Operations Table
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef int (*rtems_filesystem_open_t)(
|
typedef int (*rtems_filesystem_open_t)(
|
||||||
rtems_libio_t *iop,
|
rtems_libio_t *iop,
|
||||||
const char *pathname,
|
const char *pathname,
|
||||||
@@ -161,7 +159,6 @@ struct _rtems_filesystem_file_handlers_r {
|
|||||||
* ie. node_access does not have to contain valid data when the
|
* ie. node_access does not have to contain valid data when the
|
||||||
* routine returns.
|
* routine returns.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef int (*rtems_filesystem_mknod_t)(
|
typedef int (*rtems_filesystem_mknod_t)(
|
||||||
const char *path, /* IN */
|
const char *path, /* IN */
|
||||||
mode_t mode, /* IN */
|
mode_t mode, /* IN */
|
||||||
@@ -348,27 +345,10 @@ rtems_filesystem_unregister(
|
|||||||
const char *type
|
const char *type
|
||||||
);
|
);
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Now in exec/include/rtems/fs.h */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Structure used to determine a location/filesystem in the tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
struct rtems_filesystem_location_info_tt
|
|
||||||
{
|
|
||||||
void *node_access;
|
|
||||||
rtems_filesystem_file_handlers_r *handlers;
|
|
||||||
rtems_filesystem_operations_table *ops;
|
|
||||||
rtems_filesystem_mount_table_entry_t *mt_entry;
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Structure used to contain file system specific information which
|
* Structure used to contain file system specific information which
|
||||||
* is required to support fpathconf().
|
* is required to support fpathconf().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int link_max; /* count */
|
int link_max; /* count */
|
||||||
int max_canon; /* max formatted input line size */
|
int max_canon; /* max formatted input line size */
|
||||||
@@ -445,9 +425,7 @@ struct rtems_filesystem_mount_table_entry_tt {
|
|||||||
/*
|
/*
|
||||||
* Valid RTEMS file systems options
|
* Valid RTEMS file systems options
|
||||||
*/
|
*/
|
||||||
|
typedef enum {
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
RTEMS_FILESYSTEM_READ_ONLY,
|
RTEMS_FILESYSTEM_READ_ONLY,
|
||||||
RTEMS_FILESYSTEM_READ_WRITE,
|
RTEMS_FILESYSTEM_READ_WRITE,
|
||||||
RTEMS_FILESYSTEM_BAD_OPTIONS
|
RTEMS_FILESYSTEM_BAD_OPTIONS
|
||||||
@@ -460,7 +438,6 @@ typedef enum
|
|||||||
* should really have a separate per/file data structure that this
|
* should really have a separate per/file data structure that this
|
||||||
* points to (eg: size, offset, driver, pathname should be in that)
|
* points to (eg: size, offset, driver, pathname should be in that)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct rtems_libio_tt {
|
struct rtems_libio_tt {
|
||||||
rtems_driver_name_t *driver;
|
rtems_driver_name_t *driver;
|
||||||
rtems_off64_t size; /* size of file */
|
rtems_off64_t size; /* size of file */
|
||||||
@@ -479,7 +456,6 @@ struct rtems_libio_tt {
|
|||||||
* Note: it must include 'offset' instead of using iop's offset since
|
* Note: it must include 'offset' instead of using iop's offset since
|
||||||
* we can have multiple outstanding i/o's on a device.
|
* we can have multiple outstanding i/o's on a device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
rtems_libio_t *iop;
|
rtems_libio_t *iop;
|
||||||
rtems_off64_t offset;
|
rtems_off64_t offset;
|
||||||
@@ -492,7 +468,6 @@ typedef struct {
|
|||||||
/*
|
/*
|
||||||
* param block for open/close
|
* param block for open/close
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
rtems_libio_t *iop;
|
rtems_libio_t *iop;
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
@@ -502,7 +477,6 @@ typedef struct {
|
|||||||
/*
|
/*
|
||||||
* param block for ioctl
|
* param block for ioctl
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
rtems_libio_t *iop;
|
rtems_libio_t *iop;
|
||||||
uint32_t command;
|
uint32_t command;
|
||||||
@@ -513,7 +487,6 @@ typedef struct {
|
|||||||
/*
|
/*
|
||||||
* Values for 'flag'
|
* Values for 'flag'
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define LIBIO_FLAGS_NO_DELAY 0x0001 /* return immediately if no data */
|
#define LIBIO_FLAGS_NO_DELAY 0x0001 /* return immediately if no data */
|
||||||
#define LIBIO_FLAGS_READ 0x0002 /* reading */
|
#define LIBIO_FLAGS_READ 0x0002 /* reading */
|
||||||
#define LIBIO_FLAGS_WRITE 0x0004 /* writing */
|
#define LIBIO_FLAGS_WRITE 0x0004 /* writing */
|
||||||
@@ -568,7 +541,6 @@ typedef rtems_off64_t (*rtems_libio_lseek_t)(
|
|||||||
* used to check permissions. These are similar in style to the
|
* used to check permissions. These are similar in style to the
|
||||||
* mode_t bits and should stay compatible with them.
|
* mode_t bits and should stay compatible with them.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define RTEMS_LIBIO_PERMS_READ S_IROTH
|
#define RTEMS_LIBIO_PERMS_READ S_IROTH
|
||||||
#define RTEMS_LIBIO_PERMS_WRITE S_IWOTH
|
#define RTEMS_LIBIO_PERMS_WRITE S_IWOTH
|
||||||
#define RTEMS_LIBIO_PERMS_RDWR (S_IROTH|S_IWOTH)
|
#define RTEMS_LIBIO_PERMS_RDWR (S_IROTH|S_IWOTH)
|
||||||
@@ -580,17 +552,6 @@ typedef rtems_off64_t (*rtems_libio_lseek_t)(
|
|||||||
* Macros
|
* Macros
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if 0
|
|
||||||
#define rtems_filesystem_make_dev_t( _major, _minor ) \
|
|
||||||
((((dev_t)(_major)) << 32) | (dev_t)(_minor))
|
|
||||||
|
|
||||||
#define rtems_filesystem_dev_major_t( _dev ) \
|
|
||||||
(rtems_device_major_number) ((_dev) >> 32)
|
|
||||||
|
|
||||||
#define rtems_filesystem_dev_minor_t( _dev ) \
|
|
||||||
(rtems_device_minor_number) ((_dev) & 0xFFFFFFFF)
|
|
||||||
#else
|
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
union __rtems_dev_t {
|
union __rtems_dev_t {
|
||||||
@@ -634,8 +595,6 @@ static inline rtems_device_minor_number rtems_filesystem_dev_minor_t(
|
|||||||
return temp.__overlay.minor;
|
return temp.__overlay.minor;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define rtems_filesystem_split_dev_t( _dev, _major, _minor ) \
|
#define rtems_filesystem_split_dev_t( _dev, _major, _minor ) \
|
||||||
do { \
|
do { \
|
||||||
(_major) = rtems_filesystem_dev_major_t ( _dev ); \
|
(_major) = rtems_filesystem_dev_major_t ( _dev ); \
|
||||||
@@ -648,18 +607,15 @@ static inline rtems_device_minor_number rtems_filesystem_dev_minor_t(
|
|||||||
#define rtems_libio_is_valid_perms( _perm ) \
|
#define rtems_libio_is_valid_perms( _perm ) \
|
||||||
(~ ((~RTEMS_LIBIO_PERMS_RWX) & _perm ))
|
(~ ((~RTEMS_LIBIO_PERMS_RWX) & _perm ))
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Prototypes for filesystem
|
* Prototypes for filesystem
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void rtems_filesystem_initialize( void );
|
void rtems_filesystem_initialize( void );
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Callbacks from TERMIOS routines to device-dependent code
|
* Callbacks from TERMIOS routines to device-dependent code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
|
||||||
typedef struct rtems_termios_callbacks {
|
typedef struct rtems_termios_callbacks {
|
||||||
@@ -676,7 +632,6 @@ typedef struct rtems_termios_callbacks {
|
|||||||
/*
|
/*
|
||||||
* Device-independent TERMIOS routines
|
* Device-independent TERMIOS routines
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void rtems_termios_initialize (void);
|
void rtems_termios_initialize (void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -750,7 +705,6 @@ typedef struct {
|
|||||||
extern const rtems_filesystem_mount_table_t *rtems_filesystem_mount_table;
|
extern const rtems_filesystem_mount_table_t *rtems_filesystem_mount_table;
|
||||||
extern const int rtems_filesystem_mount_table_size;
|
extern const int rtems_filesystem_mount_table_size;
|
||||||
|
|
||||||
|
|
||||||
typedef void (*rtems_libio_init_functions_t)(void);
|
typedef void (*rtems_libio_init_functions_t)(void);
|
||||||
extern rtems_libio_init_functions_t rtems_libio_init_helper;
|
extern rtems_libio_init_functions_t rtems_libio_init_helper;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user