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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 )
Note: See TracChangeset for help on using the changeset viewer.