summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2013-09-20 12:39:54 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-10-08 21:24:27 -0500
commitcf3d24d5e0d78e4e8fe1c155a7c556164ae42a51 (patch)
tree7592703a4504d7860af0d9a81872ef17b29104d7 /src/lib
parentaa0428221628fdb25c980f5764a3b4400004ee5d (diff)
downloadtalos-hostboot-cf3d24d5e0d78e4e8fe1c155a7c556164ae42a51.tar.gz
talos-hostboot-cf3d24d5e0d78e4e8fe1c155a7c556164ae42a51.zip
Runtime trace interfaces.
Change-Id: Ie261eba4bd790150d520bb0261f56c8329cb6a80 RTC: 79420 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6400 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/string.C55
1 files changed, 32 insertions, 23 deletions
diff --git a/src/lib/string.C b/src/lib/string.C
index 18cfec530..52c54a56b 100644
--- a/src/lib/string.C
+++ b/src/lib/string.C
@@ -1,26 +1,25 @@
-/* IBM_PROLOG_BEGIN_TAG
- * This is an automatically generated prolog.
- *
- * $Source: src/lib/string.C $
- *
- * IBM CONFIDENTIAL
- *
- * COPYRIGHT International Business Machines Corp. 2011-2012
- *
- * p1
- *
- * Object Code Only (OCO) source materials
- * Licensed Internal Code Source Materials
- * IBM HostBoot Licensed Internal Code
- *
- * The source code for this program is not published or other-
- * wise divested of its trade secrets, irrespective of what has
- * been deposited with the U.S. Copyright Office.
- *
- * Origin: 30
- *
- * IBM_PROLOG_END_TAG
- */
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/lib/string.C $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2011,2013 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
#include <string.h>
extern "C" void *memset(void *vdest, int ch, size_t len)
@@ -202,6 +201,16 @@ extern "C" size_t strlen(const char* a)
return length;
}
+extern "C" size_t strnlen(const char* s, size_t n)
+{
+ size_t length = 0;
+ while((length < n) && (*s++))
+ {
+ length++;
+ }
+ return length;
+}
+
extern "C" char* strcat(char* d, const char* s)
{
char* _d = d;
OpenPOWER on IntegriCloud