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

component.
This commit is contained in:
Joel Sherrill
1998-03-30 14:01:19 +00:00
parent 6937fd82f1
commit 8f95b5f67b
47 changed files with 118 additions and 666 deletions

View File

@@ -24,7 +24,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
/* for sbrk prototype in linux */
#if defined(__linux__)
@@ -176,34 +175,13 @@ bsp_pretasking_hook(void)
}
/*
* After drivers are setup, register some "filenames"
* and open stdin, stdout, stderr files
*
* Newlib will automatically associate the files with these
* (it hardcodes the numbers)
* DO NOT Use the shared bsp_postdriver_hook() implementation
*/
void
bsp_postdriver_hook(void)
{
#if 0
int stdin_fd, stdout_fd, stderr_fd;
int error_code;
error_code = 'S' << 24 | 'T' << 16;
if ((stdin_fd = __rtems_open("/dev/console", O_RDONLY, 0)) == -1)
rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
if ((stdout_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
if ((stderr_fd = __rtems_open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
#endif
return;
}
/*