summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/mvme167
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-10-15 17:50:00 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-10-15 17:50:00 +0000
commitb4288f054d9d349abb81aa0dbd58ffc7e6c9563c (patch)
tree58ca6dbc720fe8eb9e9c61a9dc1c05ec2e04f8f6 /c/src/lib/libbsp/m68k/mvme167
parent2008-10-15 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-b4288f054d9d349abb81aa0dbd58ffc7e6c9563c.tar.bz2
2008-10-15 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1303/bsps * fatal/bspfatal.c: strcat() is safe to use even in worst case, so do not have BSP specific mystrcat().
Diffstat (limited to 'c/src/lib/libbsp/m68k/mvme167')
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/ChangeLog6
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c42
2 files changed, 14 insertions, 34 deletions
diff --git a/c/src/lib/libbsp/m68k/mvme167/ChangeLog b/c/src/lib/libbsp/m68k/mvme167/ChangeLog
index ce2aca8b9c..e776e5ef42 100644
--- a/c/src/lib/libbsp/m68k/mvme167/ChangeLog
+++ b/c/src/lib/libbsp/m68k/mvme167/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-15 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ PR 1303/bsps
+ * fatal/bspfatal.c: strcat() is safe to use even in worst case, so do
+ not have BSP specific mystrcat().
+
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect
diff --git a/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c b/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c
index 0568486df3..6e0b6e13a0 100644
--- a/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c
+++ b/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c
@@ -13,33 +13,7 @@
#include <bsp.h>
#include <fatal.h>
-
-/*
- * mystrcat
- *
- * Can't rely on libc being operational. So we provide our own strcat-like
- * function.
- *
- * Input parameters:
- * destination - string (buffer) to append to
- * source - string to append to the end of destination
- *
- * Output parameters:
- * destination - source is appended to the end
- *
- * Return values:
- * Number of characters appended.
- */
-static int mystrcat(
- char *destination,
- const char *source
-)
-{
- int i;
-
- for ( i = 0; ( *destination++ = *source++) != '\0'; i++ );
- return i;
-}
+#include <string.h>
/*
* bsp_fatal_error_occurred
@@ -73,42 +47,42 @@ User_extensions_routine bsp_fatal_error_occurred(
} my_p_str;
my_p_str.index = 0;
- my_p_str.index += mystrcat(
+ my_p_str.index += strcat(
my_p_str.strbuf + my_p_str.index,
"\r\nRTEMS Fatal Error Occurred:\r\n the_source = " );
switch ( the_source ) {
case INTERNAL_ERROR_CORE:
- my_p_str.index += mystrcat(
+ my_p_str.index += strcat(
my_p_str.strbuf + my_p_str.index,
"INTERNAL_ERROR_CORE\r\n is_internal = " );
break;
case INTERNAL_ERROR_RTEMS_API:
- my_p_str.index += mystrcat(
+ my_p_str.index += strcat(
my_p_str.strbuf + my_p_str.index,
"INTERNAL_ERROR_RTEMS_API\r\n is_internal = " );
break;
case INTERNAL_ERROR_POSIX_API:
- my_p_str.index += mystrcat(
+ my_p_str.index += strcat(
my_p_str.strbuf + my_p_str.index,
"INTERNAL_ERROR_POSIX_API\r\n is_internal = " );
break;
default:
- my_p_str.index += mystrcat(
+ my_p_str.index += strcat(
my_p_str.strbuf + my_p_str.index,
"UNKNOWN\r\n is_internal = " );
break;
}
if ( is_internal )
- my_p_str.index += mystrcat(
+ my_p_str.index += strcat(
my_p_str.strbuf + my_p_str.index,
"TRUE\r\n the_error = 0x|10,8|\r\n" );
else
- my_p_str.index += mystrcat(
+ my_p_str.index += strcat(
my_p_str.strbuf + my_p_str.index,
"FALSE\r\n the_error = 0x|10,8|\r\n" );