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


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

Legend:

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