summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-12-09 09:28:31 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-12-12 08:03:30 +0100
commite203b65e516c8201360f018a3f029185cd10cba6 (patch)
treef3e661065ace0ceab2914fcddb7b0425ed8dc9ac
parenta5ba08eb4f20591e8c36a12ae4a30c13f8be5c56 (diff)
downloadrtems-e203b65e516c8201360f018a3f029185cd10cba6.tar.bz2
Add INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED
Update #2825.
-rw-r--r--cpukit/libcsupport/src/open_dev_console.c2
-rw-r--r--cpukit/sapi/src/interrtext.c3
-rw-r--r--cpukit/score/include/rtems/score/interr.h3
-rw-r--r--testsuites/sptests/spfatal15/testcase.h4
-rw-r--r--testsuites/sptests/spinternalerror02/init.c2
5 files changed, 8 insertions, 6 deletions
diff --git a/cpukit/libcsupport/src/open_dev_console.c b/cpukit/libcsupport/src/open_dev_console.c
index 50c1e0839f..5bba0fb7e3 100644
--- a/cpukit/libcsupport/src/open_dev_console.c
+++ b/cpukit/libcsupport/src/open_dev_console.c
@@ -43,7 +43,7 @@ void rtems_libio_post_driver(void)
}
if (open("/dev/console", O_WRONLY, 0) != STDERR_FILENO) {
- rtems_fatal_error_occurred( 0x55544432 );
+ _Internal_error( INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED );
}
atexit(rtems_libio_exit);
diff --git a/cpukit/sapi/src/interrtext.c b/cpukit/sapi/src/interrtext.c
index f15c82b908..c92f922878 100644
--- a/cpukit/sapi/src/interrtext.c
+++ b/cpukit/sapi/src/interrtext.c
@@ -63,7 +63,8 @@ static const char *const internal_error_text[] = {
"INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED",
"INTERNAL_ERROR_LIBIO_USER_ENV_KEY_CREATE_FAILED",
"INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED",
- "INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED"
+ "INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED",
+ "INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED"
};
const char *rtems_internal_error_text( rtems_fatal_code error )
diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h
index 61a41538e0..7dd6168f7a 100644
--- a/cpukit/score/include/rtems/score/interr.h
+++ b/cpukit/score/include/rtems/score/interr.h
@@ -176,7 +176,8 @@ typedef enum {
INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED = 33,
INTERNAL_ERROR_LIBIO_USER_ENV_KEY_CREATE_FAILED = 34,
INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED = 35,
- INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED = 36
+ INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED = 36,
+ INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED = 37
} Internal_errors_Core_list;
typedef CPU_Uint32ptr Internal_errors_t;
diff --git a/testsuites/sptests/spfatal15/testcase.h b/testsuites/sptests/spfatal15/testcase.h
index 742b5b992d..fc3d25f2db 100644
--- a/testsuites/sptests/spfatal15/testcase.h
+++ b/testsuites/sptests/spfatal15/testcase.h
@@ -10,8 +10,8 @@
/* generate fatal errors in open_dev_console.c */
#define FATAL_ERROR_TEST_NAME "15"
#define FATAL_ERROR_DESCRIPTION "fail to open stderr"
-#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
-#define FATAL_ERROR_EXPECTED_ERROR 0x55544432
+#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
+#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 2
diff --git a/testsuites/sptests/spinternalerror02/init.c b/testsuites/sptests/spinternalerror02/init.c
index aa5f12e35d..412675535f 100644
--- a/testsuites/sptests/spinternalerror02/init.c
+++ b/testsuites/sptests/spinternalerror02/init.c
@@ -36,7 +36,7 @@ static void test_internal_error_text(void)
} while ( text != text_last );
rtems_test_assert(
- error - 3 == INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED
+ error - 3 == INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED
);
}