Changeset 8f95b5f in rtems for c/src/lib/libbsp/m68k/mvme147


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/m68k/mvme147/startup
Files:
2 edited

Legend:

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