From aa61d533075eb4bcbfa2ee94205ff7dc48c483d2 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 31 May 2010 20:18:04 +0000 Subject: 2010-05-31 Joel Sherrill * libcsupport/include/rtems/libio.h: Remove if 0 section. Formatting. --- cpukit/libcsupport/include/rtems/libio.h | 94 ++++++++------------------------ 1 file changed, 24 insertions(+), 70 deletions(-) (limited to 'cpukit/libcsupport/include/rtems/libio.h') diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index 4f45ee47ac..794c1ca220 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -48,7 +48,6 @@ typedef _off64_t rtems_off64_t; /* * Valid RTEMS file types. */ - #define RTEMS_FILESYSTEM_DIRECTORY 1 #define RTEMS_FILESYSTEM_DEVICE 2 #define RTEMS_FILESYSTEM_HARD_LINK 3 @@ -59,7 +58,6 @@ typedef int rtems_filesystem_node_types_t; /* * File Handler Operations Table */ - typedef int (*rtems_filesystem_open_t)( rtems_libio_t *iop, 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 * routine returns. */ - typedef int (*rtems_filesystem_mknod_t)( const char *path, /* IN */ mode_t mode, /* IN */ @@ -348,27 +345,10 @@ rtems_filesystem_unregister( 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 * is required to support fpathconf(). */ - typedef struct { int link_max; /* count */ int max_canon; /* max formatted input line size */ @@ -445,9 +425,7 @@ struct rtems_filesystem_mount_table_entry_tt { /* * Valid RTEMS file systems options */ - -typedef enum -{ +typedef enum { RTEMS_FILESYSTEM_READ_ONLY, RTEMS_FILESYSTEM_READ_WRITE, RTEMS_FILESYSTEM_BAD_OPTIONS @@ -460,18 +438,17 @@ typedef enum * should really have a separate per/file data structure that this * points to (eg: size, offset, driver, pathname should be in that) */ - struct rtems_libio_tt { - rtems_driver_name_t *driver; - rtems_off64_t size; /* size of file */ - rtems_off64_t offset; /* current offset into file */ - uint32_t flags; - rtems_filesystem_location_info_t pathinfo; - rtems_id sem; - uint32_t data0; /* private to "driver" */ - void *data1; /* ... */ - void *file_info; /* used by file handlers */ - const rtems_filesystem_file_handlers_r *handlers; /* type specific handlers */ + rtems_driver_name_t *driver; + rtems_off64_t size; /* size of file */ + rtems_off64_t offset; /* current offset into file */ + uint32_t flags; + rtems_filesystem_location_info_t pathinfo; + rtems_id sem; + uint32_t data0; /* private to "driver" */ + void *data1; /* ... */ + void *file_info; /* used by file handlers */ + const rtems_filesystem_file_handlers_r *handlers; /* type specific handlers */ }; /* @@ -479,41 +456,37 @@ struct rtems_libio_tt { * Note: it must include 'offset' instead of using iop's offset since * we can have multiple outstanding i/o's on a device. */ - typedef struct { - rtems_libio_t *iop; - rtems_off64_t offset; - char *buffer; - uint32_t count; - uint32_t flags; - uint32_t bytes_moved; + rtems_libio_t *iop; + rtems_off64_t offset; + char *buffer; + uint32_t count; + uint32_t flags; + uint32_t bytes_moved; } rtems_libio_rw_args_t; /* * param block for open/close */ - typedef struct { - rtems_libio_t *iop; - uint32_t flags; - uint32_t mode; + rtems_libio_t *iop; + uint32_t flags; + uint32_t mode; } rtems_libio_open_close_args_t; /* * param block for ioctl */ - typedef struct { - rtems_libio_t *iop; - uint32_t command; - void *buffer; - uint32_t ioctl_return; + rtems_libio_t *iop; + uint32_t command; + void *buffer; + uint32_t ioctl_return; } rtems_libio_ioctl_args_t; /* * Values for 'flag' */ - #define LIBIO_FLAGS_NO_DELAY 0x0001 /* return immediately if no data */ #define LIBIO_FLAGS_READ 0x0002 /* reading */ #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 * mode_t bits and should stay compatible with them. */ - #define RTEMS_LIBIO_PERMS_READ S_IROTH #define RTEMS_LIBIO_PERMS_WRITE S_IWOTH #define RTEMS_LIBIO_PERMS_RDWR (S_IROTH|S_IWOTH) @@ -580,17 +552,6 @@ typedef rtems_off64_t (*rtems_libio_lseek_t)( * 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 union __rtems_dev_t { @@ -634,8 +595,6 @@ static inline rtems_device_minor_number rtems_filesystem_dev_minor_t( return temp.__overlay.minor; } -#endif - #define rtems_filesystem_split_dev_t( _dev, _major, _minor ) \ do { \ (_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 ) \ (~ ((~RTEMS_LIBIO_PERMS_RWX) & _perm )) - /* * Prototypes for filesystem */ void rtems_filesystem_initialize( void ); - /* * Callbacks from TERMIOS routines to device-dependent code */ - #include typedef struct rtems_termios_callbacks { @@ -676,7 +632,6 @@ typedef struct rtems_termios_callbacks { /* * Device-independent TERMIOS routines */ - void rtems_termios_initialize (void); /* @@ -750,7 +705,6 @@ typedef struct { extern const rtems_filesystem_mount_table_t *rtems_filesystem_mount_table; extern const int rtems_filesystem_mount_table_size; - typedef void (*rtems_libio_init_functions_t)(void); extern rtems_libio_init_functions_t rtems_libio_init_helper; -- cgit v1.2.3