Changeset 8f95b5f in rtems


Ignore:
Timestamp:
Mar 30, 1998, 2:01:19 PM (23 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
c895f42a
Parents:
6937fd82
Message:

Moved bsp_postdriver_hook() to a shared file and made it a common
component.

Location:
c/src/lib/libbsp
Files:
1 added
46 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/a29k/portsw/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec iface
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec iface
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/a29k/portsw/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2727 
    2828#include <string.h>
    29 #include <fcntl.h>
    3029 
    3130#ifdef STACK_CHECKER_ON
     
    138137
    139138/*
    140  * After drivers are setup, register some "filenames"
    141  * and open stdin, stdout, stderr files
    142  *
    143  * Newlib will automatically associate the files with these
    144  * (it hardcodes the numbers)
    145  */
    146  
    147 void
    148 bsp_postdriver_hook(void)
    149 {
    150   int stdin_fd, stdout_fd, stderr_fd;
    151   int error_code;
    152  
    153   error_code = 'S' << 24 | 'T' << 16;
    154  
    155   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    156     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    157  
    158   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    159     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    160  
    161   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    162     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    163  
    164   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    165     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    166 
    167   printf("allocated %d heap size, %d work space size\n",
    168      heap_size, BSP_Configuration.work_space_size);
    169   printf(" work space start 0x%x\n",(unsigned int)BSP_Configuration.work_space_start);
    170 }
    171 
     139 *  Use the shared bsp_postdriver_hook() implementation
     140 */
     141 
     142void bsp_postdriver_hook(void);
    172143
    173144int bsp_start(
  • c/src/lib/libbsp/hppa1.1/simhppa/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c

    r6937fd82 r8f95b5f  
    3030
    3131#include <string.h>
    32 #include <fcntl.h>
    3332
    3433#ifdef STACK_CHECKER_ON
     
    230229
    231230/*
    232  * After drivers are setup, register some "filenames"
    233  * and open stdin, stdout, stderr files
    234  *
    235  * Newlib will automatically associate the files with these
    236  * (it hardcodes the numbers)
    237  */
    238 
    239 void
    240 bsp_postdriver_hook(void)
    241 {
    242   int stdin_fd, stdout_fd, stderr_fd;
    243   int error_code;
     231 *  Use the shared bsp_postdriver_hook() implementation
     232 */
    244233 
    245   error_code = 'S' << 24 | 'T' << 16;
    246  
    247   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    248     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    249  
    250   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    251     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    252  
    253   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    254     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    255  
    256   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    257     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    258 }
     234void bsp_postdriver_hook(void);
    259235
    260236/*
  • c/src/lib/libbsp/i386/force386/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/i386/force386/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2525
    2626#include <libcsupport.h>
    27 
    28 #include <fcntl.h>
    2927
    3028#ifdef STACK_CHECKER_ON
     
    112110
    113111/*
    114  * After drivers are setup, register some "filenames"
    115  * and open stdin, stdout, stderr files
    116  *
    117  * Newlib will automatically associate the files with these
    118  * (it hardcodes the numbers)
     112 *  Use the shared bsp_postdriver_hook() implementation
    119113 */
    120114 
    121 void
    122 bsp_postdriver_hook(void)
    123 {
    124   int stdin_fd, stdout_fd, stderr_fd;
    125   int error_code;
    126  
    127   error_code = 'S' << 24 | 'T' << 16;
    128  
    129   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    130     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    131  
    132   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    133     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    134  
    135   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    136     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    137  
    138   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    139     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    140 }
     115void bsp_postdriver_hook(void);
    141116
    142117void bsp_start( void )
  • c/src/lib/libbsp/i386/go32/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspstart sbrk setvec
     14C_PIECES=bsppost bspstart sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/i386/go32/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2828 
    2929#include <string.h>
    30 #include <fcntl.h>
    3130 
    3231#ifdef STACK_CHECKER_ON
     
    119118
    120119/*
    121  * After drivers are setup, register some "filenames"
    122  * and open stdin, stdout, stderr files
    123  *
    124  * Newlib will automatically associate the files with these
    125  * (it hardcodes the numbers)
    126  */
    127  
    128 void
    129 bsp_postdriver_hook(void)
    130 {
    131   int stdin_fd, stdout_fd, stderr_fd;
    132   int error_code;
    133  
    134   error_code = 'S' << 24 | 'T' << 16;
    135  
    136   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    137     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    138  
    139   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    140     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    141  
    142   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    143     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    144  
    145   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    146     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    147 }
     120 *  Use the shared bsp_postdriver_hook() implementation
     121 */
     122 
     123void bsp_postdriver_hook(void);
    148124
    149125/* This is the original command line passed from DOS */
  • c/src/lib/libbsp/i386/pc386/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart exit irq main sbrk
     14C_PIECES=bspclean bsppost bspstart exit irq main sbrk
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/i386/pc386/startup/bspstart.c

    r6937fd82 r8f95b5f  
    3535
    3636
    37 #include <fcntl.h>
    38 
    3937#include <bsp.h>
    4038#include <libcsupport.h>
     
    137135 
    138136
    139 /*-------------------------------------------------------------------------+
    140 |         Function: bsp_postdriver_hook
    141 |      Description: After drivers are setup, register some "filenames" and open
    142 |                   stdin, stdout, stderr files. Newlib will automatically
    143 |                   associate the files with these (it hardcodes the numbers).
    144 | Global Variables: None.
    145 |        Arguments: None.
    146 |          Returns: Nothing.
    147 +--------------------------------------------------------------------------*/
    148 void
    149 bsp_postdriver_hook(void)
    150 {
    151   int stdin_fd, stdout_fd, stderr_fd;
    152 
    153   rtems_status_code error_code;
    154  
    155   error_code = 'S' << 24 | 'T' << 16;
    156 
    157   /* open standard devices: stdout, stderr and stdin */
    158  
    159   if ((stdin_fd =  __rtems_open("/dev/console", O_RDONLY, 0)) < 0)
    160     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    161  
    162   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) < 0)
    163     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    164  
    165   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) < 1)
    166     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    167  
    168   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    169     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    170 } /* bsp_postdriver_hook */
     137/*
     138 *  Use the shared bsp_postdriver_hook() implementation
     139 */
     140 
     141void bsp_postdriver_hook(void);
    171142
    172143
  • c/src/lib/libbsp/i960/cvme961/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/i960/cvme961/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2727 
    2828#include <string.h>
    29 #include <fcntl.h>
    3029 
    3130#ifdef STACK_CHECKER_ON
     
    114113
    115114/*
    116  * After drivers are setup, register some "filenames"
    117  * and open stdin, stdout, stderr files
    118  *
    119  * Newlib will automatically associate the files with these
    120  * (it hardcodes the numbers)
    121  */
    122  
    123 void
    124 bsp_postdriver_hook(void)
    125 {
    126   int stdin_fd, stdout_fd, stderr_fd;
    127   int error_code;
    128  
    129   error_code = 'S' << 24 | 'T' << 16;
    130  
    131   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    132     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    133  
    134   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    135     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    136  
    137   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    138     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    139  
    140   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    141     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    142 }
     115 *  Use the shared bsp_postdriver_hook() implementation
     116 */
     117 
     118void bsp_postdriver_hook(void);
    143119
    144120void bsp_start( void )
  • c/src/lib/libbsp/m68k/dmv152/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec vmeintr
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec vmeintr
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2727 
    2828#include <string.h>
    29 #include <fcntl.h>
    3029 
    3130#ifdef STACK_CHECKER_ON
     
    112111
    113112/*
    114  * After drivers are setup, register some "filenames"
    115  * and open stdin, stdout, stderr files
    116  *
    117  * Newlib will automatically associate the files with these
    118  * (it hardcodes the numbers)
    119  */
    120  
    121 void
    122 bsp_postdriver_hook(void)
    123 {
    124   int stdin_fd, stdout_fd, stderr_fd;
    125   int error_code;
    126  
    127   error_code = 'S' << 24 | 'T' << 16;
    128  
    129   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    130     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    131  
    132   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    133     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    134  
    135   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    136     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    137  
    138   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    139     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    140 }
     113 *  Use the shared bsp_postdriver_hook() implementation
     114 */
     115 
     116void bsp_postdriver_hook(void);
    141117
    142118void bsp_start( void )
  • c/src/lib/libbsp/m68k/efi332/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspstart bspclean main sbrk setvec
     14C_PIECES=bsppost bspstart bspclean main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/efi332/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2626 
    2727#include <string.h>
    28 #include <fcntl.h>
    2928 
    3029#ifdef STACK_CHECKER_ON
     
    120119 
    121120/*
    122  * After drivers are setup, register some "filenames"
    123  * and open stdin, stdout, stderr files
    124  *
    125  * Newlib will automatically associate the files with these
    126  * (it hardcodes the numbers)
     121 *  Use the shared bsp_postdriver_hook() implementation
    127122 */
    128123 
    129 void
    130 bsp_postdriver_hook(void)
    131 {
    132   int stdin_fd, stdout_fd, stderr_fd;
    133   int error_code;
    134  
    135   error_code = 'S' << 24 | 'T' << 16;
    136  
    137   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    138     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    139  
    140   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    141     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    142  
    143   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    144     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    145  
    146   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    147     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    148 }
    149  
     124void bsp_postdriver_hook(void);
     125
    150126void bsp_start( void )
    151127{
  • c/src/lib/libbsp/m68k/efi68k/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspstart bspclean efi68k_tcp efi68k_wd main sbrk setvec
     14C_PIECES=bsppost bspstart bspclean efi68k_tcp efi68k_wd main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/efi68k/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2626
    2727#include <string.h>
    28 #include <fcntl.h>
    2928 
    3029#ifdef STACK_CHECKER_ON
     
    125124 
    126125/*
    127  * After drivers are setup, register some "filenames"
    128  * and open stdin, stdout, stderr files
    129  *
    130  * Newlib will automatically associate the files with these
    131  * (it hardcodes the numbers)
     126 *  Use the shared bsp_postdriver_hook() implementation
    132127 */
    133128 
    134 void
    135 bsp_postdriver_hook(void)
    136 {
    137   int stdin_fd, stdout_fd, stderr_fd;
    138   int error_code;
    139  
    140   error_code = 'S' << 24 | 'T' << 16;
    141  
    142   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    143     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    144  
    145   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    146     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    147  
    148   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    149     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    150  
    151   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    152     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    153 }
     129void bsp_postdriver_hook(void);
     130
    154131
    155132void bsp_start( void )
  • c/src/lib/libbsp/m68k/gen68302/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2727 
    2828#include <string.h>
    29 #include <fcntl.h>
    3029 
    3130#ifdef STACK_CHECKER_ON
     
    120119
    121120/*
    122  * After drivers are setup, register some "filenames"
    123  * and open stdin, stdout, stderr files
    124  *
    125  * Newlib will automatically associate the files with these
    126  * (it hardcodes the numbers)
    127  */
    128  
    129 void
    130 bsp_postdriver_hook(void)
    131 {
    132   int stdin_fd, stdout_fd, stderr_fd;
    133   int error_code;
    134  
    135   error_code = 'S' << 24 | 'T' << 16;
    136  
    137   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    138     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    139  
    140   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    141     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    142  
    143   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    144     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    145  
    146   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    147     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    148 }
     121 *  Use the shared bsp_postdriver_hook() implementation
     122 */
     123 
     124void bsp_postdriver_hook(void);
     125
    149126
    150127void bsp_start( void )
  • c/src/lib/libbsp/m68k/gen68360/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=alloc360 bspclean bspstart init68360 main sbrk setvec
     14C_PIECES=alloc360 bspclean bsppost bspstart init68360 main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/gen68360/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2727 
    2828#include <string.h>
    29 #include <fcntl.h>
    3029 
    3130#ifdef STACK_CHECKER_ON
     
    116115
    117116/*
    118  * After drivers are setup, register some "filenames"
    119  * and open stdin, stdout, stderr files
    120  *
    121  * Newlib will automatically associate the files with these
    122  * (it hardcodes the numbers)
    123  */
    124  
    125 void
    126 bsp_postdriver_hook(void)
    127 {
    128   int stdin_fd, stdout_fd, stderr_fd;
    129   int error_code;
    130  
    131   error_code = 'S' << 24 | 'T' << 16;
    132  
    133   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    134     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    135  
    136   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    137     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    138  
    139   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    140     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    141  
    142   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    143     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    144 }
     117 *  Use the shared bsp_postdriver_hook() implementation
     118 */
     119 
     120void bsp_postdriver_hook(void);
    145121
    146122void bsp_start( void )
  • c/src/lib/libbsp/m68k/idp/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/idp/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2727 
    2828#include <string.h>
    29 #include <fcntl.h>
    3029 
    3130#ifdef STACK_CHECKER_ON
     
    121120
    122121/*
    123  * After drivers are setup, register some "filenames"
    124  * and open stdin, stdout, stderr files
    125  *
    126  * Newlib will automatically associate the files with these
    127  * (it hardcodes the numbers)
    128  */
    129  
    130 void
    131 bsp_postdriver_hook(void)
    132 {
    133   int stdin_fd, stdout_fd, stderr_fd;
    134   int error_code;
    135  
    136   error_code = 'S' << 24 | 'T' << 16;
    137  
    138   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    139     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    140  
    141   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    142     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    143  
    144   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    145     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    146  
    147   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    148     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    149 }
     122 *  Use the shared bsp_postdriver_hook() implementation
     123 */
     124 
     125void bsp_postdriver_hook(void);
    150126
    151127void bsp_start( void )
  • c/src/lib/libbsp/m68k/mvme136/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2828
    2929#include <string.h>
    30 #include <fcntl.h>
    3130
    3231#ifdef STACK_CHECKER_ON
     
    112111}
    113112 
    114 
    115113/*
    116  * After drivers are setup, register some "filenames"
    117  * and open stdin, stdout, stderr files
    118  *
    119  * Newlib will automatically associate the files with these
    120  * (it hardcodes the numbers)
     114 *  Use the shared bsp_postdriver_hook() implementation
    121115 */
    122116 
    123 void
    124 bsp_postdriver_hook(void)
    125 {
    126   int stdin_fd, stdout_fd, stderr_fd;
    127   int error_code;
    128  
    129   error_code = 'S' << 24 | 'T' << 16;
    130  
    131   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    132     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    133  
    134   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    135     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    136  
    137   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    138     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    139  
    140   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    141     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    142 }
     117void bsp_postdriver_hook(void);
    143118
    144119void bsp_start( void )
  • c/src/lib/libbsp/m68k/mvme147/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c

    r6937fd82 r8f95b5f  
    3131
    3232#include <string.h>
    33 #include <fcntl.h>
    3433
    3534#ifdef STACK_CHECKER_ON
     
    117116
    118117/*
    119  * After drivers are setup, register some "filenames"
    120  * and open stdin, stdout, stderr files
    121  *
    122  * Newlib will automatically associate the files with these
    123  * (it hardcodes the numbers)
    124  */
    125  
    126 void
    127 bsp_postdriver_hook(void)
    128 {
    129   int stdin_fd, stdout_fd, stderr_fd;
    130   int error_code;
    131  
    132   error_code = 'S' << 24 | 'T' << 16;
    133  
    134   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    135     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    136  
    137   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    138     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    139  
    140   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    141     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    142  
    143   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    144     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    145 }
     118 *  Use the shared bsp_postdriver_hook() implementation
     119 */
     120 
     121void bsp_postdriver_hook(void);
     122
    146123
    147124void bsp_start( void )
  • c/src/lib/libbsp/m68k/mvme147s/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c

    r6937fd82 r8f95b5f  
    3131
    3232#include <string.h>
    33 #include <fcntl.h>
    3433
    3534#ifdef STACK_CHECKER_ON
     
    117116
    118117/*
    119  * After drivers are setup, register some "filenames"
    120  * and open stdin, stdout, stderr files
    121  *
    122  * Newlib will automatically associate the files with these
    123  * (it hardcodes the numbers)
    124  */
    125  
    126 void
    127 bsp_postdriver_hook(void)
    128 {
    129   int stdin_fd, stdout_fd, stderr_fd;
    130   int error_code;
    131  
    132   error_code = 'S' << 24 | 'T' << 16;
    133  
    134   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    135     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    136  
    137   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    138     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    139  
    140   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    141     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    142  
    143   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    144     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    145 }
     118 *  Use the shared bsp_postdriver_hook() implementation
     119 */
     120 
     121void bsp_postdriver_hook(void);
     122
    146123
    147124void bsp_start( void )
  • c/src/lib/libbsp/m68k/mvme162/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main page_table sbrk setvec
     14C_PIECES=bspclean bsppost bspstart main page_table sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c

    r6937fd82 r8f95b5f  
    3535 
    3636#include <string.h>
    37 #include <fcntl.h>
    3837 
    3938#ifdef STACK_CHECKER_ON
     
    121120
    122121/*
    123  * After drivers are setup, register some "filenames"
    124  * and open stdin, stdout, stderr files
    125  *
    126  * Newlib will automatically associate the files with these
    127  * (it hardcodes the numbers)
    128  */
    129  
    130 void
    131 bsp_postdriver_hook(void)
    132 {
    133   int stdin_fd, stdout_fd, stderr_fd;
    134   int error_code;
    135  
    136   error_code = 'S' << 24 | 'T' << 16;
    137  
    138   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    139     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    140  
    141   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    142     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    143  
    144   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    145     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    146  
    147   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    148     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    149 }
     122 *  Use the shared bsp_postdriver_hook() implementation
     123 */
     124 
     125void bsp_postdriver_hook(void);
     126
    150127
    151128void bsp_start( void )
  • c/src/lib/libbsp/m68k/ods68302/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1313# C source names, if any, go here -- minus the .c
    1414C_PIECES=crc debugport gdb-hooks main m68302scc m68k-stub memcheck trace \
    15                 bspstart bspclean sbrk setvec
     15                bsppost bspstart bspclean sbrk setvec
    1616C_FILES=$(C_PIECES:%=%.c)
    1717C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/m68k/ods68302/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2727 
    2828#include <string.h>
    29 #include <fcntl.h>
    3029 
    3130#ifdef STACK_CHECKER_ON
     
    121120
    122121/*
    123  * After drivers are setup, register some "filenames"
    124  * and open stdin, stdout, stderr files
    125  *
    126  * Newlib will automatically associate the files with these
    127  * (it hardcodes the numbers)
    128  */
    129  
    130 void
    131 bsp_postdriver_hook(void)
    132 {
    133   int stdin_fd, stdout_fd, stderr_fd;
    134   int error_code;
    135  
    136   error_code = 'S' << 24 | 'T' << 16;
    137  
    138   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    139     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    140  
    141   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    142     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    143  
    144   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    145     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    146  
    147   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    148     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    149 }
     122 *  Use the shared bsp_postdriver_hook() implementation
     123 */
     124 
     125void bsp_postdriver_hook(void);
    150126
    151127void bsp_start( void )
  • c/src/lib/libbsp/mips/p4000/startup/bspstart.c

    r6937fd82 r8f95b5f  
    3535 
    3636#include <string.h>
    37 #include <fcntl.h>
    3837 
    3938#ifdef STACK_CHECKER_ON
     
    129128}
    130129 
    131 
    132 /*
    133  * After drivers are setup, register some "filenames"
    134  * and open stdin, stdout, stderr files
    135  *
    136  * Newlib will automatically associate the files with these
    137  * (it hardcodes the numbers)
    138  */
    139  
    140 void
    141 bsp_postdriver_hook(void)
    142 {
    143   int stdin_fd, stdout_fd, stderr_fd;
    144   int error_code;
    145  
    146   error_code = 'S' << 24 | 'T' << 16;
    147  
    148   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    149     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    150  
    151   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    152     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    153  
    154   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    155     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    156  
    157   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    158     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    159 }
    160 
     130/*
     131 *  Use the shared bsp_postdriver_hook() implementation
     132 */
     133 
     134void bsp_postdriver_hook(void);
    161135
    162136extern int end; /* defined by linker */
  • c/src/lib/libbsp/mips64orion/p4000/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec inittlb
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec inittlb
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/mips64orion/p4000/startup/bspstart.c

    r6937fd82 r8f95b5f  
    3535 
    3636#include <string.h>
    37 #include <fcntl.h>
    3837 
    3938#ifdef STACK_CHECKER_ON
     
    129128}
    130129 
    131 
    132 /*
    133  * After drivers are setup, register some "filenames"
    134  * and open stdin, stdout, stderr files
    135  *
    136  * Newlib will automatically associate the files with these
    137  * (it hardcodes the numbers)
    138  */
    139  
    140 void
    141 bsp_postdriver_hook(void)
    142 {
    143   int stdin_fd, stdout_fd, stderr_fd;
    144   int error_code;
    145  
    146   error_code = 'S' << 24 | 'T' << 16;
    147  
    148   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    149     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    150  
    151   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    152     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    153  
    154   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    155     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    156  
    157   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    158     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    159 }
    160 
     130/*
     131 *  Use the shared bsp_postdriver_hook() implementation
     132 */
     133 
     134void bsp_postdriver_hook(void);
    161135
    162136extern int end; /* defined by linker */
  • c/src/lib/libbsp/no_cpu/no_bsp/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2727 
    2828#include <string.h>
    29 #include <fcntl.h>
    3029 
    3130#ifdef STACK_CHECKER_ON
     
    121120
    122121/*
    123  * After drivers are setup, register some "filenames"
    124  * and open stdin, stdout, stderr files
    125  *
    126  * Newlib will automatically associate the files with these
    127  * (it hardcodes the numbers)
    128  */
    129  
    130 void
    131 bsp_postdriver_hook(void)
    132 {
    133   int stdin_fd, stdout_fd, stderr_fd;
    134   int error_code;
    135  
    136   error_code = 'S' << 24 | 'T' << 16;
    137  
    138   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    139     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    140  
    141   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    142     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    143  
    144   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    145     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    146  
    147   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    148     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    149 }
     122 *  Use the shared bsp_postdriver_hook() implementation
     123 */
     124 
     125void bsp_postdriver_hook(void);
    150126
    151127int bsp_start(
  • c/src/lib/libbsp/powerpc/papyrus/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c

    r6937fd82 r8f95b5f  
    4444 
    4545#include <string.h>
    46 #include <fcntl.h>
    4746 
    4847#ifdef STACK_CHECKER_ON
     
    139138
    140139/*
    141  * After drivers are setup, register some "filenames"
    142  * and open stdin, stdout, stderr files
    143  *
    144  * Newlib will automatically associate the files with these
    145  * (it hardcodes the numbers)
    146  */
    147  
    148 void
    149 bsp_postdriver_hook(void)
    150 {
    151   int stdin_fd, stdout_fd, stderr_fd;
    152   int error_code;
    153  
    154   error_code = 'S' << 24 | 'T' << 16;
    155  
    156   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    157     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    158  
    159   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    160     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    161  
    162   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    163     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    164  
    165   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    166     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    167 }
     140 *  Use the shared bsp_postdriver_hook() implementation
     141 */
     142 
     143void bsp_postdriver_hook(void);
     144
    168145
    169146void bsp_start( void )
  • c/src/lib/libbsp/sh/gensh1/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspstart bspclean sbrk setvec main
     14C_PIECES=bsppost bspstart bspclean sbrk setvec main
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/sh/gensh1/startup/bspstart.c

    r6937fd82 r8f95b5f  
    3737 
    3838#include <string.h>
    39 #include <fcntl.h>
    4039 
    4140#ifdef STACK_CHECKER_ON
     
    121120#endif
    122121}
    123  
    124122
    125123/*
    126  * After drivers are setup, register some "filenames"
    127  * and open stdin, stdout, stderr files
    128  *
    129  * Newlib will automatically associate the files with these
    130  * (it hardcodes the numbers)
    131  */
    132  
    133 void
    134 bsp_postdriver_hook(void)
    135 {
    136   int stdin_fd, stdout_fd, stderr_fd;
    137   int error_code;
    138  
    139   error_code = 'S' << 24 | 'T' << 16;
    140  
    141   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    142     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    143  
    144   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    145     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    146  
    147   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    148     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    149  
    150   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    151     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    152 }
     124 *  Use the shared bsp_postdriver_hook() implementation
     125 */
     126 
     127void bsp_postdriver_hook(void);
     128
    153129
    154130void bsp_start(void)
  • c/src/lib/libbsp/sparc/erc32/startup/Makefile.in

    r6937fd82 r8f95b5f  
    1212
    1313# C source names, if any, go here -- minus the .c
    14 C_PIECES=bspclean bspstart main sbrk setvec spurious
     14C_PIECES=bspclean bsppost bspstart main sbrk setvec spurious
    1515C_FILES=$(C_PIECES:%=%.c)
    1616C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
  • c/src/lib/libbsp/sparc/erc32/startup/bspstart.c

    r6937fd82 r8f95b5f  
    3232
    3333#include <string.h>
    34 #include <fcntl.h>
    3534
    3635#ifdef STACK_CHECKER_ON
     
    205204
    206205/*
    207  *  bsp_postdriver_hook
    208  *
    209  *  After drivers are setup, register some "filenames"
    210  *  and open stdin, stdout, stderr files
    211  *
    212  *  Newlib will automatically associate the files with these
    213  *  (it hardcodes the numbers)
    214  */
    215  
    216 void
    217 bsp_postdriver_hook(void)
    218 {
    219   int stdin_fd, stdout_fd, stderr_fd;
    220   int error_code;
    221  
    222   error_code = 'S' << 24 | 'T' << 16;
    223  
    224   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    225     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    226  
    227   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    228     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    229  
    230   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    231     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    232  
    233   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    234     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    235 }
     206 *  Use the shared bsp_postdriver_hook() implementation
     207 */
     208 
     209void bsp_postdriver_hook(void);
     210
    236211
    237212/*
  • c/src/lib/libbsp/unix/posix/startup/bspstart.c

    r6937fd82 r8f95b5f  
    2525#include <stdio.h>
    2626#include <stdlib.h>
    27 #include <fcntl.h>
    2827
    2928/* for sbrk prototype in linux */
     
    177176
    178177/*
    179  * After drivers are setup, register some "filenames"
    180  * and open stdin, stdout, stderr files
    181  *
    182  * Newlib will automatically associate the files with these
    183  * (it hardcodes the numbers)
     178 *  DO NOT Use the shared bsp_postdriver_hook() implementation
    184179 */
    185180 
     
    187182bsp_postdriver_hook(void)
    188183{
    189 #if 0
    190   int stdin_fd, stdout_fd, stderr_fd;
    191   int error_code;
    192  
    193   error_code = 'S' << 24 | 'T' << 16;
    194  
    195   if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
    196     rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
    197  
    198   if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    199     rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
    200  
    201   if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
    202     rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
    203  
    204   if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
    205     rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
    206 #endif
     184  return;
    207185}
    208186
Note: See TracChangeset for help on using the changeset viewer.