diff options
-rw-r--r-- | src/include/usr/errl/errlentry.H | 9 | ||||
-rw-r--r-- | src/usr/errl/errlentry.C | 24 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H index 48af65a22..6e67bf55c 100644 --- a/src/include/usr/errl/errlentry.H +++ b/src/include/usr/errl/errlentry.H @@ -618,6 +618,15 @@ private: /** + * @brief Called by commit(), this fucntion creates a + * user details section which contains the Hostboot + * build ID and adds this to the current error log being + * processed. + */ + void addHbBuildId(); + + + /** * @brief Disabled copy constructor and assignment operator */ ErrlEntry(const ErrlEntry& i_right); 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(); + } /////////////////////////////////////////////////////////////////////////////// |