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


Ignore:
Timestamp:
Mar 30, 1998, 2:01:19 PM (24 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/dmv152/startup
Files:
2 edited

Legend:

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