summaryrefslogtreecommitdiffstats
path: root/src/usr/errl/parser/errlusrparser.C
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2013-02-08 17:13:45 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-02-28 10:03:27 -0600
commit3d50adf7e2ba101168f6e0cb1be69d552814500f (patch)
treeeb93bb56e495ff1f03acb3cece39a065958e580f /src/usr/errl/parser/errlusrparser.C
parent7d09350be4f99be134923640315755902a13c8a5 (diff)
downloadblackbird-hostboot-3d50adf7e2ba101168f6e0cb1be69d552814500f.tar.gz
blackbird-hostboot-3d50adf7e2ba101168f6e0cb1be69d552814500f.zip
Support ERRL UD and SRC parsing in hostboot standalone
Change-Id: I16ec13f87d9a71c3e0248bf4776e9f3402be6285 RTC:49967 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3138 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: Mark W. Wenning <wenning@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/errl/parser/errlusrparser.C')
-rwxr-xr-xsrc/usr/errl/parser/errlusrparser.C185
1 files changed, 0 insertions, 185 deletions
diff --git a/src/usr/errl/parser/errlusrparser.C b/src/usr/errl/parser/errlusrparser.C
deleted file mode 100755
index 569b2202d..000000000
--- a/src/usr/errl/parser/errlusrparser.C
+++ /dev/null
@@ -1,185 +0,0 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/errl/parser/errlusrparser.C $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// 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
-/**
- * @file errlusrparser.C
- *
- * @brief <Brief Description of this file>
- *
- * <Detailed description of what this file does, functions it includes,
- * etc,>
-*/
-
-/*****************************************************************************/
-// I n c l u d e s
-/*****************************************************************************/
-#include <cstring>
-#include <ctype.h>
-#include <cstdarg>
-
-#include <errl/parser/errlusrparser.H>
-
-/*****************************************************************************/
-// Constant string defines
-/*****************************************************************************/
-const char * ERRL_MSG_UNKNOWN = "Unknown";
-const char * ERRL_MSG_BOOL_TRUE = "True";
-const char * ERRL_MSG_BOOL_FALSE = "False";
-const char * ERRL_MSG_STR_ENABLED = "Enabled";
-const char * ERRL_MSG_STR_DISABLED = "Disabled";
-
-
-/*****************************************************************************/
-// Send the label & return # of chars printed
-/*****************************************************************************/
-static int PrintLabel(
- FILE * i_stream,
- const char * i_label
- )
-{
- if ( ! i_label )
- {
- i_label = "";
- }
-
- return fprintf(i_stream,"| %-25.25s: ",i_label);
-}
-
-
-/*****************************************************************************/
-// Regular string ( may be multiline )
-/*****************************************************************************/
-void ErrlUsrParser::PrintString(
- const char * i_label,
- const char * i_string
- )
-{
- // Must make sure the string fits on the available width
- int l_strlen = 0;
- int l_printed = 0;
-
-
- // Ensure String is valid
- if ( i_string )
- {
- l_strlen = strlen( i_string );
- }
-
- // Fake a blank string
- if ( ! l_strlen )
- {
- l_strlen = 1;
- i_string = " ";
- }
-
- // Print it out
- while ( l_strlen > l_printed )
- {
- // Leader ( label or blanks )
- PrintLabel( iv_Stream, i_label );
-
- // label is only printed once
- i_label = "";
-
- l_printed += fprintf(
- iv_Stream,
- "%-50.50s",
- i_string+l_printed
- );
-
- fprintf(iv_Stream,"|\n");
- }
-}
-/*****************************************************************************/
-// Numeric Print
-/*****************************************************************************/
-void ErrlUsrParser::PrintNumber(
- const char * i_label,
- const char * i_fmt,
- uint32_t i_value
- ){
- ErrlParser::PrintNumber( i_label, i_fmt, i_value );
-}
-
-
-/*****************************************************************************/
-// Hex Dump
-/*****************************************************************************/
-void ErrlUsrParser::PrintHexDump(
- const void * i_data,
- uint32_t i_len
- )
-{
- uint32_t i = 0 ;
- uint32_t l_counter = 0;
- uint32_t l_written;
- uint8_t *l_data = (uint8_t*)i_data;
-
- while ( l_counter < i_len)
- {
- fprintf(iv_Stream,"| %08X ",l_counter);
-
- // Display 16 bytes in Hex with 2 spaces in between
- l_written = 0;
- for ( i = 0; i < 16 && l_counter < i_len; i++ )
- {
- l_written += fprintf(iv_Stream,"%02X",l_data[l_counter++]);
-
- if ( ! ( l_counter % 4 ) )
- {
- l_written += fprintf(iv_Stream," ");
- }
- }
-
- // Pad with spaces
- fprintf(iv_Stream,"%-*c",43-l_written,' ');
-
- // Display ASCII -- fk1
- l_written = 0;
- uint8_t l_char;
- for ( ; i > 0 ; i-- )
- {
- l_char = l_data[ l_counter-i ];
-
- if ( isprint( l_char ) &&
- ( l_char != '&' ) &&
- ( l_char != '<' ) &&
- ( l_char != '>' )
- )
- {
- l_written += fprintf( iv_Stream,"%c",l_char );
- }
- else
- {
- l_written += fprintf( iv_Stream,"." );
- }
- }
-
- // Pad with spaces -- fk1
- fprintf( iv_Stream,"%-*c|\n",19-l_written,' ' );
-
-
-
- }
-}
-
-
OpenPOWER on IntegriCloud