diff options
author | Elliott Dahle <dedahle@us.ibm.com> | 2013-10-16 16:15:52 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-10-21 16:19:01 -0500 |
commit | 995723d1a67b151621a1a3b968690064047ff029 (patch) | |
tree | 9a05e93e4d514c706b1b8032879063324ef75583 /src/usr | |
parent | b1a66e367999d32c023a542a814a3610db108b44 (diff) | |
download | talos-hostboot-995723d1a67b151621a1a3b968690064047ff029.tar.gz talos-hostboot-995723d1a67b151621a1a3b968690064047ff029.zip |
Add Hostboot build ID to error logs
Change-Id: Ib3db87ba4d13ce5fe675515f8b99b183813f5214
RTC: 82311
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6736
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/errl/errlentry.C | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index 27d8a5941..c60a0af61 100644 --- a/src/usr/errl/errlentry.C +++ b/src/usr/errl/errlentry.C @@ -38,12 +38,16 @@ #include <errl/errludbacktrace.H> #include <errl/errludcallout.H> #include <errl/errlreasoncodes.H> +#include <errl/errludstring.H> #include <trace/interface.H> #include <arch/ppc.H> #include <hwas/common/hwasCallout.H> #include <hwas/common/deconfigGard.H> #include <targeting/common/targetservice.H> +// Hostboot Image ID string +extern char hbi_ImageId; + using namespace ERRORLOG; using namespace HWAS; @@ -441,6 +445,22 @@ void ErrlEntry::addProcedureCallout(const HWAS::epubProcedureID i_procedure, } // addProcedureCallout +/////////////////////////////////////////////////////////////////////////////// +// Function to add a UD section containing the Hostboot Build ID to the +// current error log being committed +void ErrlEntry::addHbBuildId() +{ + // Title string + const char * const l_title = "Hostboot Build ID: "; + // Char[] based on title + Hostboot image ID + char l_pString[strlen(l_title) + strlen(&hbi_ImageId) + 1]; + // Set beginning of string + strcpy(l_pString, l_title); + // Concatenate the Hostboot Image ID + strcat(l_pString, &hbi_ImageId); + // Create UD section and add string + ErrlUserDetailsString(l_pString).addToLog(this); +} /////////////////////////////////////////////////////////////////////////////// // for use by ErrlManager @@ -462,6 +482,10 @@ void ErrlEntry::commit( compId_t i_committerComponent ) delete iv_pBackTrace; iv_pBackTrace = NULL; } + + // Add the Hostboot Build ID to the error log + addHbBuildId(); + } /////////////////////////////////////////////////////////////////////////////// |