Changeset 8b8e1ee5 in rtems
- Timestamp:
- 06/20/07 22:21:05 (15 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 5a8bc44
- Parents:
- 442e430d
- Location:
- c/src/lib/libbsp/shared
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/shared/ChangeLog
r442e430d r8b8e1ee5 1 2007-06-20 Joel Sherrill <joel.sherrill@OARcorp.com> 2 3 * bsppost.c: Split open of the console from the standard BSP code so it 4 is easier to stub out. 5 1 6 2007-05-10 Till Straumann <strauman@slac.stanford.edu> 2 7 -
c/src/lib/libbsp/shared/bsppost.c
r442e430d r8b8e1ee5 21 21 void bsp_postdriver_hook(void) 22 22 { 23 int stdin_fd, stdout_fd, stderr_fd; 24 int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8; 23 extern void open_dev_console(void); 25 24 26 /* 27 * Attempt to open /dev/console. 28 */ 29 if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 30 /* 31 * There may not be a console driver so this is OK. 32 */ 33 return; 34 } 35 36 /* 37 * But if we find /dev/console once, we better find it twice more 38 * or something is REALLY wrong. 39 */ 40 if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 41 rtems_fatal_error_occurred( error_code | '1' ); 42 43 if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 44 rtems_fatal_error_occurred( error_code | '2' ); 25 open_dev_console(); 45 26 }
Note: See TracChangeset
for help on using the changeset viewer.