summaryrefslogtreecommitdiff
path: root/cpukit
diff options
context:
space:
mode:
authorChristian Mauderer <Christian.Mauderer@embedded-brains.de>2017-11-13 09:21:28 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-11-17 07:26:41 +0100
commitddc339c51fa436e91eba083029bec3849997899e (patch)
treea44b0ac3edccfcc8a038f8d9d33cee8bf35f9ad9 /cpukit
parent91a2d5e68b79409689e7748dd6da8d4bd262adac (diff)
cpukit: Add _arc4random_getentropy_fail.
Add a default implementation of _arc4random_getentropy_fail with an internal error. Update #3239.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libcsupport/Makefile.am3
-rw-r--r--cpukit/libcsupport/src/arc4random_getentropy_fail.c21
-rw-r--r--cpukit/sapi/src/interrtext.c3
-rw-r--r--cpukit/score/include/rtems/score/interr.h3
4 files changed, 27 insertions, 3 deletions
diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am
index 756526ae8e..038ac93548 100644
--- a/cpukit/libcsupport/Makefile.am
+++ b/cpukit/libcsupport/Makefile.am
@@ -116,7 +116,8 @@ TERMINAL_IDENTIFICATION_C_FILES += src/ttyname.c
LIBC_GLUE_C_FILES = src/__getpid.c src/__gettod.c src/__times.c \
src/truncate.c src/access.c src/stat.c src/lstat.c src/pathconf.c \
src/newlibc_reent.c src/newlibc_exit.c \
- src/kill_noposix.c src/utsname.c src/realpath.c
+ src/kill_noposix.c src/utsname.c src/realpath.c \
+ src/arc4random_getentropy_fail.c
BSD_LIBC_C_FILES = src/strlcpy.c src/strlcat.c src/issetugid.c
diff --git a/cpukit/libcsupport/src/arc4random_getentropy_fail.c b/cpukit/libcsupport/src/arc4random_getentropy_fail.c
new file mode 100644
index 0000000000..88aa1ca328
--- /dev/null
+++ b/cpukit/libcsupport/src/arc4random_getentropy_fail.c
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Dornierstr. 4
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <machine/_arc4random.h>
+#include <rtems/score/interr.h>
+
+void _arc4random_getentropy_fail( void )
+{
+ _Internal_error( INTERNAL_ERROR_ARC4RANDOM_GETENTROPY_FAIL );
+}
diff --git a/cpukit/sapi/src/interrtext.c b/cpukit/sapi/src/interrtext.c
index 6fada4be26..79ba7948ef 100644
--- a/cpukit/sapi/src/interrtext.c
+++ b/cpukit/sapi/src/interrtext.c
@@ -65,7 +65,8 @@ static const char *const internal_error_text[] = {
"INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED",
"INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED",
"INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED",
- "INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT"
+ "INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT",
+ "INTERNAL_ERROR_ARC4RANDOM_GETENTROPY_FAIL"
};
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 ca64341948..0c02c21348 100644
--- a/cpukit/score/include/rtems/score/interr.h
+++ b/cpukit/score/include/rtems/score/interr.h
@@ -178,7 +178,8 @@ typedef enum {
INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILED = 35,
INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILED = 36,
INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILED = 37,
- INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT = 38
+ INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT = 38,
+ INTERNAL_ERROR_ARC4RANDOM_GETENTROPY_FAIL = 39
} Internal_errors_Core_list;
typedef CPU_Uint32ptr Internal_errors_t;