diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-03-30 14:01:19 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-03-30 14:01:19 +0000 |
commit | 8f95b5f67b59eef4aa392b6be72f59af720d9ea2 (patch) | |
tree | af9b523e50efac2535bb4adc90d162f84ec78284 /c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c | |
parent | Renamed crt0.o to crt0_go32.o to avoid build problems. (diff) | |
download | rtems-8f95b5f67b59eef4aa392b6be72f59af720d9ea2.tar.bz2 |
Moved bsp_postdriver_hook() to a shared file and made it a common
component.
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c b/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c index 98e6d9e470..5d0c4a64f2 100644 --- a/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c @@ -43,7 +43,6 @@ #include <libcsupport.h> #include <string.h> -#include <fcntl.h> #ifdef STACK_CHECKER_ON #include <stackchk.h> @@ -138,33 +137,11 @@ 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) + * Use the shared bsp_postdriver_hook() implementation */ -void -bsp_postdriver_hook(void) -{ - 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' ); -} +void bsp_postdriver_hook(void); + void bsp_start( void ) { |