Changeset d09ad1f0 in rtems


Ignore:
Timestamp:
Jan 16, 2002, 10:54:59 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
6449498
Parents:
36a63d78
Message:

2002-02-09 Ralf Corsepius <corsepiu@…>

  • include/rtems/libio.h: Add #include <rtems/fs.h>. Reflect changes due to using rtems/fs.h.
  • include/rtems/libio_.h: Reworked.
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/include/rtems/libio.h

    r36a63d78 rd09ad1f0  
    2929 */
    3030
    31 typedef struct rtems_libio_tt rtems_libio_t;
    32 
    33 struct rtems_filesystem_location_info_tt;
    34 typedef struct rtems_filesystem_location_info_tt
    35     rtems_filesystem_location_info_t;
    36 
    37 struct rtems_filesystem_mount_table_entry_tt;
    38 typedef struct rtems_filesystem_mount_table_entry_tt
    39     rtems_filesystem_mount_table_entry_t;
     31#include <rtems/fs.h>
    4032
    4133/*
     
    126118);
    127119
    128 typedef struct {
     120struct _rtems_filesystem_file_handlers_r {
    129121    rtems_filesystem_open_t         open_h;
    130122    rtems_filesystem_close_t        close_h;
     
    141133    rtems_filesystem_fcntl_t        fcntl_h;
    142134    rtems_filesystem_rmnod_t        rmnod_h;
    143 } rtems_filesystem_file_handlers_r;
     135};
    144136
    145137/*
     
    249241 * File system types
    250242 */
    251 typedef struct {
     243struct _rtems_filesystem_operations_table {
    252244    rtems_filesystem_evalpath_t      evalpath_h;
    253245    rtems_filesystem_evalmake_t      evalformake_h;
     
    266258    rtems_filesystem_symlink_t       symlink_h;
    267259    rtems_filesystem_readlink_t      readlink_h;
    268 } rtems_filesystem_operations_table;
     260};
     261
     262#if 0
     263/* Now in exec/include/rtems/fs.h */
    269264
    270265/*
     
    279274  rtems_filesystem_mount_table_entry_t   *mt_entry;
    280275};
     276#endif
    281277
    282278/*
  • c/src/exec/libcsupport/include/rtems/libio_.h

    r36a63d78 rd09ad1f0  
    2121#include <rtems.h>
    2222#include <rtems/libio.h>                /* include before standard IO */
    23 #include <rtems/assoc.h>                /* assoc.h not included by rtems.h */
    2423
    2524#include <sys/types.h>                 
    26        
    27 #include <stdio.h>                      /* O_RDONLY, et.al. */
    28 #include <fcntl.h>                      /* O_RDONLY, et.al. */
    29 #include <assert.h>
    30 #include <stdarg.h>
    31 #include <limits.h>
     25
    3226#include <errno.h>
    33 
    34 #if ! defined(O_NDELAY)
    35 # if defined(solaris2)
    36 #  define O_NDELAY O_NONBLOCK
    37 # elif defined(RTEMS_NEWLIB)
    38 #  define O_NDELAY _FNBIO
    39 # endif
    40 #endif
    41 
    42 #if !defined(ENOTSUP)
    43 #define ENOTSUP EOPNOTSUPP
    44 #endif
    45 
    46 #include <errno.h>
    47 #include <string.h>                     /* strcmp */
    48 #include <unistd.h>
    49 #include <stdlib.h>                     /* calloc() */
    5027
    5128/*
     
    202179 *  External structures
    203180 */
    204 #if !defined(LOGIN_NAME_MAX)
    205 #if defined(__linux__)
    206 #define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
    207 #else
    208 #error "don't know how to set LOGIN_NAME_MAX"
    209 #endif
    210 #endif
    211 
    212 typedef struct {
    213  rtems_id                         task_id;     
    214  rtems_filesystem_location_info_t current_directory;
    215  rtems_filesystem_location_info_t root_directory;
    216  /* Default mode for all files. */
    217  mode_t                           umask;
    218  nlink_t                          link_counts;
    219  /* _POSIX_types */
    220  uid_t                            uid;
    221  gid_t                            gid;
    222  uid_t                            euid;
    223  gid_t                            egid;
    224  char      login_buffer[LOGIN_NAME_MAX];
    225 
    226  pid_t                            pgrp; /* process group id */
    227 } rtems_user_env_t;
     181#include <rtems/userenv.h>
    228182
    229183extern rtems_user_env_t * rtems_current_user_env;
    230184extern rtems_user_env_t   rtems_global_user_env;
    231 
    232 #define rtems_filesystem_current     (rtems_current_user_env->current_directory)
    233 #define rtems_filesystem_root        (rtems_current_user_env->root_directory)
    234 #define rtems_filesystem_link_counts (rtems_current_user_env->link_counts)
    235 #define rtems_filesystem_umask       (rtems_current_user_env->umask)
    236 
    237 #define _POSIX_types_Uid             (rtems_current_user_env->uid)
    238 #define _POSIX_types_Gid             (rtems_current_user_env->gid)
    239 #define _POSIX_types_Euid            (rtems_current_user_env->euid)
    240 #define _POSIX_types_Egid            (rtems_current_user_env->egid)
    241 #define _POSIX_types_Getlogin_buffer (rtems_current_user_env->login_buffer)
    242185
    243186/*
     
    248191rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
    249192       
    250 
    251 
    252193/*
    253194 *  File Descriptor Routine Prototypes
     
    297238#endif
    298239/* end of include file */
    299 
    300 
    301 
  • c/src/lib/ChangeLog

    r36a63d78 rd09ad1f0  
     12002-02-09      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
     2
     3        * include/rtems/libio.h: Add #include <rtems/fs.h>.
     4        Reflect changes due to using rtems/fs.h.
     5        * include/rtems/libio_.h: Reworked.
     6
    172002-02-07      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    28
  • c/src/lib/include/rtems/libio.h

    r36a63d78 rd09ad1f0  
    2929 */
    3030
    31 typedef struct rtems_libio_tt rtems_libio_t;
    32 
    33 struct rtems_filesystem_location_info_tt;
    34 typedef struct rtems_filesystem_location_info_tt
    35     rtems_filesystem_location_info_t;
    36 
    37 struct rtems_filesystem_mount_table_entry_tt;
    38 typedef struct rtems_filesystem_mount_table_entry_tt
    39     rtems_filesystem_mount_table_entry_t;
     31#include <rtems/fs.h>
    4032
    4133/*
     
    126118);
    127119
    128 typedef struct {
     120struct _rtems_filesystem_file_handlers_r {
    129121    rtems_filesystem_open_t         open_h;
    130122    rtems_filesystem_close_t        close_h;
     
    141133    rtems_filesystem_fcntl_t        fcntl_h;
    142134    rtems_filesystem_rmnod_t        rmnod_h;
    143 } rtems_filesystem_file_handlers_r;
     135};
    144136
    145137/*
     
    249241 * File system types
    250242 */
    251 typedef struct {
     243struct _rtems_filesystem_operations_table {
    252244    rtems_filesystem_evalpath_t      evalpath_h;
    253245    rtems_filesystem_evalmake_t      evalformake_h;
     
    266258    rtems_filesystem_symlink_t       symlink_h;
    267259    rtems_filesystem_readlink_t      readlink_h;
    268 } rtems_filesystem_operations_table;
     260};
     261
     262#if 0
     263/* Now in exec/include/rtems/fs.h */
    269264
    270265/*
     
    279274  rtems_filesystem_mount_table_entry_t   *mt_entry;
    280275};
     276#endif
    281277
    282278/*
  • c/src/lib/include/rtems/libio_.h

    r36a63d78 rd09ad1f0  
    2121#include <rtems.h>
    2222#include <rtems/libio.h>                /* include before standard IO */
    23 #include <rtems/assoc.h>                /* assoc.h not included by rtems.h */
    2423
    2524#include <sys/types.h>                 
    26        
    27 #include <stdio.h>                      /* O_RDONLY, et.al. */
    28 #include <fcntl.h>                      /* O_RDONLY, et.al. */
    29 #include <assert.h>
    30 #include <stdarg.h>
    31 #include <limits.h>
     25
    3226#include <errno.h>
    33 
    34 #if ! defined(O_NDELAY)
    35 # if defined(solaris2)
    36 #  define O_NDELAY O_NONBLOCK
    37 # elif defined(RTEMS_NEWLIB)
    38 #  define O_NDELAY _FNBIO
    39 # endif
    40 #endif
    41 
    42 #if !defined(ENOTSUP)
    43 #define ENOTSUP EOPNOTSUPP
    44 #endif
    45 
    46 #include <errno.h>
    47 #include <string.h>                     /* strcmp */
    48 #include <unistd.h>
    49 #include <stdlib.h>                     /* calloc() */
    5027
    5128/*
     
    202179 *  External structures
    203180 */
    204 #if !defined(LOGIN_NAME_MAX)
    205 #if defined(__linux__)
    206 #define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
    207 #else
    208 #error "don't know how to set LOGIN_NAME_MAX"
    209 #endif
    210 #endif
    211 
    212 typedef struct {
    213  rtems_id                         task_id;     
    214  rtems_filesystem_location_info_t current_directory;
    215  rtems_filesystem_location_info_t root_directory;
    216  /* Default mode for all files. */
    217  mode_t                           umask;
    218  nlink_t                          link_counts;
    219  /* _POSIX_types */
    220  uid_t                            uid;
    221  gid_t                            gid;
    222  uid_t                            euid;
    223  gid_t                            egid;
    224  char      login_buffer[LOGIN_NAME_MAX];
    225 
    226  pid_t                            pgrp; /* process group id */
    227 } rtems_user_env_t;
     181#include <rtems/userenv.h>
    228182
    229183extern rtems_user_env_t * rtems_current_user_env;
    230184extern rtems_user_env_t   rtems_global_user_env;
    231 
    232 #define rtems_filesystem_current     (rtems_current_user_env->current_directory)
    233 #define rtems_filesystem_root        (rtems_current_user_env->root_directory)
    234 #define rtems_filesystem_link_counts (rtems_current_user_env->link_counts)
    235 #define rtems_filesystem_umask       (rtems_current_user_env->umask)
    236 
    237 #define _POSIX_types_Uid             (rtems_current_user_env->uid)
    238 #define _POSIX_types_Gid             (rtems_current_user_env->gid)
    239 #define _POSIX_types_Euid            (rtems_current_user_env->euid)
    240 #define _POSIX_types_Egid            (rtems_current_user_env->egid)
    241 #define _POSIX_types_Getlogin_buffer (rtems_current_user_env->login_buffer)
    242185
    243186/*
     
    248191rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
    249192       
    250 
    251 
    252193/*
    253194 *  File Descriptor Routine Prototypes
     
    297238#endif
    298239/* end of include file */
    299 
    300 
    301 
  • cpukit/libcsupport/include/rtems/libio.h

    r36a63d78 rd09ad1f0  
    2929 */
    3030
    31 typedef struct rtems_libio_tt rtems_libio_t;
    32 
    33 struct rtems_filesystem_location_info_tt;
    34 typedef struct rtems_filesystem_location_info_tt
    35     rtems_filesystem_location_info_t;
    36 
    37 struct rtems_filesystem_mount_table_entry_tt;
    38 typedef struct rtems_filesystem_mount_table_entry_tt
    39     rtems_filesystem_mount_table_entry_t;
     31#include <rtems/fs.h>
    4032
    4133/*
     
    126118);
    127119
    128 typedef struct {
     120struct _rtems_filesystem_file_handlers_r {
    129121    rtems_filesystem_open_t         open_h;
    130122    rtems_filesystem_close_t        close_h;
     
    141133    rtems_filesystem_fcntl_t        fcntl_h;
    142134    rtems_filesystem_rmnod_t        rmnod_h;
    143 } rtems_filesystem_file_handlers_r;
     135};
    144136
    145137/*
     
    249241 * File system types
    250242 */
    251 typedef struct {
     243struct _rtems_filesystem_operations_table {
    252244    rtems_filesystem_evalpath_t      evalpath_h;
    253245    rtems_filesystem_evalmake_t      evalformake_h;
     
    266258    rtems_filesystem_symlink_t       symlink_h;
    267259    rtems_filesystem_readlink_t      readlink_h;
    268 } rtems_filesystem_operations_table;
     260};
     261
     262#if 0
     263/* Now in exec/include/rtems/fs.h */
    269264
    270265/*
     
    279274  rtems_filesystem_mount_table_entry_t   *mt_entry;
    280275};
     276#endif
    281277
    282278/*
  • cpukit/libcsupport/include/rtems/libio_.h

    r36a63d78 rd09ad1f0  
    2121#include <rtems.h>
    2222#include <rtems/libio.h>                /* include before standard IO */
    23 #include <rtems/assoc.h>                /* assoc.h not included by rtems.h */
    2423
    2524#include <sys/types.h>                 
    26        
    27 #include <stdio.h>                      /* O_RDONLY, et.al. */
    28 #include <fcntl.h>                      /* O_RDONLY, et.al. */
    29 #include <assert.h>
    30 #include <stdarg.h>
    31 #include <limits.h>
     25
    3226#include <errno.h>
    33 
    34 #if ! defined(O_NDELAY)
    35 # if defined(solaris2)
    36 #  define O_NDELAY O_NONBLOCK
    37 # elif defined(RTEMS_NEWLIB)
    38 #  define O_NDELAY _FNBIO
    39 # endif
    40 #endif
    41 
    42 #if !defined(ENOTSUP)
    43 #define ENOTSUP EOPNOTSUPP
    44 #endif
    45 
    46 #include <errno.h>
    47 #include <string.h>                     /* strcmp */
    48 #include <unistd.h>
    49 #include <stdlib.h>                     /* calloc() */
    5027
    5128/*
     
    202179 *  External structures
    203180 */
    204 #if !defined(LOGIN_NAME_MAX)
    205 #if defined(__linux__)
    206 #define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
    207 #else
    208 #error "don't know how to set LOGIN_NAME_MAX"
    209 #endif
    210 #endif
    211 
    212 typedef struct {
    213  rtems_id                         task_id;     
    214  rtems_filesystem_location_info_t current_directory;
    215  rtems_filesystem_location_info_t root_directory;
    216  /* Default mode for all files. */
    217  mode_t                           umask;
    218  nlink_t                          link_counts;
    219  /* _POSIX_types */
    220  uid_t                            uid;
    221  gid_t                            gid;
    222  uid_t                            euid;
    223  gid_t                            egid;
    224  char      login_buffer[LOGIN_NAME_MAX];
    225 
    226  pid_t                            pgrp; /* process group id */
    227 } rtems_user_env_t;
     181#include <rtems/userenv.h>
    228182
    229183extern rtems_user_env_t * rtems_current_user_env;
    230184extern rtems_user_env_t   rtems_global_user_env;
    231 
    232 #define rtems_filesystem_current     (rtems_current_user_env->current_directory)
    233 #define rtems_filesystem_root        (rtems_current_user_env->root_directory)
    234 #define rtems_filesystem_link_counts (rtems_current_user_env->link_counts)
    235 #define rtems_filesystem_umask       (rtems_current_user_env->umask)
    236 
    237 #define _POSIX_types_Uid             (rtems_current_user_env->uid)
    238 #define _POSIX_types_Gid             (rtems_current_user_env->gid)
    239 #define _POSIX_types_Euid            (rtems_current_user_env->euid)
    240 #define _POSIX_types_Egid            (rtems_current_user_env->egid)
    241 #define _POSIX_types_Getlogin_buffer (rtems_current_user_env->login_buffer)
    242185
    243186/*
     
    248191rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
    249192       
    250 
    251 
    252193/*
    253194 *  File Descriptor Routine Prototypes
     
    297238#endif
    298239/* end of include file */
    299 
    300 
    301 
Note: See TracChangeset for help on using the changeset viewer.