summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-12-23 13:53:55 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-12-23 13:53:55 +0100
commit0374ccd8ab48dd7ff3a36ec52443f6b875690953 (patch)
tree7071e4fbe946677b96ec1fefb29e93777ab73709 /cpukit
parentClarify simple timecounter documentation (diff)
downloadrtems-0374ccd8ab48dd7ff3a36ec52443f6b875690953.tar.bz2
libio: Use CONSOLE_DEVICE_NAME
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libcsupport/src/open_dev_console.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpukit/libcsupport/src/open_dev_console.c b/cpukit/libcsupport/src/open_dev_console.c
index 5bba0fb7e3..d5bc8ef669 100644
--- a/cpukit/libcsupport/src/open_dev_console.c
+++ b/cpukit/libcsupport/src/open_dev_console.c
@@ -15,6 +15,7 @@
#include <rtems.h>
#include <rtems/libio.h>
+#include <rtems/console.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
@@ -27,7 +28,7 @@ void rtems_libio_post_driver(void)
/*
* Attempt to open /dev/console.
*/
- if (open("/dev/console", O_RDONLY, 0) != STDIN_FILENO) {
+ if ( open( CONSOLE_DEVICE_NAME, O_RDONLY, 0 ) != STDIN_FILENO ) {
/*
* There may not be a console driver so this is OK.
*/
@@ -38,11 +39,11 @@ void rtems_libio_post_driver(void)
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
- if (open("/dev/console", O_WRONLY, 0) != STDOUT_FILENO) {
+ if ( open( CONSOLE_DEVICE_NAME, O_WRONLY, 0 ) != STDOUT_FILENO ) {
_Internal_error( INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED );
}
- if (open("/dev/console", O_WRONLY, 0) != STDERR_FILENO) {
+ if ( open( CONSOLE_DEVICE_NAME, O_WRONLY, 0 ) != STDERR_FILENO ) {
_Internal_error( INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED );
}