Add INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED

Update #2825.
This commit is contained in:
Sebastian Huber
2016-12-12 08:03:30 +01:00
parent af8ced5e2d
commit a5ba08eb4f
5 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ void rtems_libio_post_driver(void)
* or something is REALLY wrong.
*/
if (open("/dev/console", O_WRONLY, 0) != STDOUT_FILENO) {
rtems_fatal_error_occurred( 0x55544431 );
_Internal_error( INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED );
}
if (open("/dev/console", O_WRONLY, 0) != STDERR_FILENO) {
+2 -1
View File
@@ -62,7 +62,8 @@ static const char *const internal_error_text[] = {
"INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED",
"INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED",
"INTERNAL_ERROR_LIBIO_USER_ENV_KEY_CREATE_FAILED",
"INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED"
"INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED",
"INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED"
};
const char *rtems_internal_error_text( rtems_fatal_code error )
+2 -1
View File
@@ -175,7 +175,8 @@ typedef enum {
INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILED = 32,
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_SEM_CREATE_FAILED = 35,
INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED = 36
} Internal_errors_Core_list;
typedef CPU_Uint32ptr Internal_errors_t;
+2 -2
View File
@@ -11,8 +11,8 @@
#define FATAL_ERROR_TEST_NAME "14"
#define FATAL_ERROR_DESCRIPTION "fail to open stdout"
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_RTEMS_API
#define FATAL_ERROR_EXPECTED_ERROR 0x55544431
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 1
+1 -1
View File
@@ -36,7 +36,7 @@ static void test_internal_error_text(void)
} while ( text != text_last );
rtems_test_assert(
error - 3 == INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED
error - 3 == INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED
);
}