forked from Imagelibrary/rtems
2007-06-20 Joel Sherrill <joel.sherrill@OARcorp.com>
* bsppost.c: Split open of the console from the standard BSP code so it is easier to stub out.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2007-06-20 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* bsppost.c: Split open of the console from the standard BSP code so it
|
||||
is easier to stub out.
|
||||
|
||||
2007-05-10 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
* vmeUniverse/vmeUniverse.c: Changed types to silence
|
||||
|
||||
@@ -20,26 +20,7 @@
|
||||
|
||||
void bsp_postdriver_hook(void)
|
||||
{
|
||||
int stdin_fd, stdout_fd, stderr_fd;
|
||||
int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8;
|
||||
extern void open_dev_console(void);
|
||||
|
||||
/*
|
||||
* Attempt to open /dev/console.
|
||||
*/
|
||||
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
|
||||
/*
|
||||
* There may not be a console driver so this is OK.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* But if we find /dev/console once, we better find it twice more
|
||||
* or something is REALLY wrong.
|
||||
*/
|
||||
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
|
||||
rtems_fatal_error_occurred( error_code | '1' );
|
||||
|
||||
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
|
||||
rtems_fatal_error_occurred( error_code | '2' );
|
||||
open_dev_console();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user