diff options
Diffstat (limited to 'src/usr/initservice/istepdispatcher')
-rw-r--r-- | src/usr/initservice/istepdispatcher/initsvcudistep.C | 62 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/istepdispatcher.C | 63 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/makefile | 2 |
3 files changed, 69 insertions, 58 deletions
diff --git a/src/usr/initservice/istepdispatcher/initsvcudistep.C b/src/usr/initservice/istepdispatcher/initsvcudistep.C new file mode 100644 index 000000000..7385087f5 --- /dev/null +++ b/src/usr/initservice/istepdispatcher/initsvcudistep.C @@ -0,0 +1,62 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/initservice/istepdispatcher/initsvcudistep.C $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 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 +/** + * @file initsvcudistep.C + * + * @brief Implementation of InitSvcUserDetailsIstep + */ +#include <initservice/initsvcudistep.H> +#include <initservice/initsvcreasoncodes.H> + +namespace INITSERVICE +{ + +//------------------------------------------------------------------------------ +InitSvcUserDetailsIstep::InitSvcUserDetailsIstep( + const char * i_pIstepname, + const uint16_t i_step, + const uint16_t i_substep) +{ + InitSvcUserDetailsIstepData * l_pBuf = + reinterpret_cast<InitSvcUserDetailsIstepData *>( + reallocUsrBuf(sizeof(InitSvcUserDetailsIstepData) + + (strlen(i_pIstepname) + 1))); + + l_pBuf->iv_step = i_step; + l_pBuf->iv_substep = i_substep; + strcpy(l_pBuf->iv_pIstepname, i_pIstepname); + + // Set up ErrlUserDetails instance variables + iv_CompId = INITSVC_COMP_ID; + iv_Version = 1; + iv_SubSection = INIT_SVC_UDT_ISTEP; +} + +//------------------------------------------------------------------------------ +InitSvcUserDetailsIstep::~InitSvcUserDetailsIstep() +{ + +} + +} + diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C index 744b4e74d..1b8b68a5a 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C @@ -49,10 +49,9 @@ #include <devicefw/userif.H> // targeting #include <initservice/isteps_trace.H> // ISTEPS_TRACE buffer - +#include <initservice/initsvcudistep.H> // InitSvcUserDetailsIstep #include <initservice/taskargs.H> // TaskArgs structs -#include <errl/errluserdetails.H> // ErrlUserDetails base class #include <targeting/attributes.H> // ISTEP_MODE attribute #include <targeting/entitypath.H> @@ -76,57 +75,6 @@ trace_desc_t *g_trac_isteps_trace = NULL; } // end namespace // ----- end namespace ISTEPS_TRACE ----------------------------------- -// ----- namespace ERRORLOG ------------------------------------------- -namespace ERRORLOG -{ -/** - * @class IStepNameUserDetail - * - * report the failing IStepName to an errorlog - * - * @todo: get rid of magic numbers in version and subsection. - * set up tags, plugins, include files, etc. - * For now we just want to report the failing istep string for debug. - * @todo: Expand this to report the istep / substep, error returned, etc. - */ - -class IStepNameUserDetail : public ErrlUserDetails -{ - -public: - - IStepNameUserDetail( - const char *i_istepname, - const uint16_t i_istep = 0, - const uint16_t i_substep = 0, - const uint64_t i_isteprc = 0 ) - { - - iv_CompId = INITSVC_COMP_ID; - iv_Version = 1; - iv_SubSection = 1; - - // Store the string in the internal buffer - char * l_pString = (char *)allocUsrBuf( strlen(i_istepname)+1 ); - strcpy(l_pString, i_istepname ); - } - -/** - * @brief Destructor - * - */ -virtual ~IStepNameUserDetail() {} - -private: - -// Disabled -IStepNameUserDetail(const IStepNameUserDetail &); -IStepNameUserDetail & operator=(const IStepNameUserDetail &); -}; - -} // ----- end namespace ERRORLOG ----------------------------------- - - // ----- namespace INITSERVICE ------------------------------------------- namespace INITSERVICE { @@ -763,10 +711,11 @@ void IStepDispatcher::runAllISteps( void * io_ptr ) const INITSERVICE::ISTEP_FAILED_NO_ERRLOG, ( l_IStep << 8 | l_SubStep ), l_isteprc ); - // attach the istep name to the error log - // @todo - IStepNameUserDetail l_istepud( l_pistep->taskname ); - l_istepud.addToLog( l_errl ); + + // Add IStep user detail data to the error log + InitSvcUserDetailsIstep(l_pistep->taskname, l_IStep, + l_SubStep).addToLog( l_errl ); + // drop out of inner loop with errlog set. break; } // end if ( ) diff --git a/src/usr/initservice/istepdispatcher/makefile b/src/usr/initservice/istepdispatcher/makefile index 43e064f00..c65342107 100644 --- a/src/usr/initservice/istepdispatcher/makefile +++ b/src/usr/initservice/istepdispatcher/makefile @@ -24,7 +24,7 @@ ROOTPATH = ../../../.. MODULE = istepdisp -OBJS = istepdispatcher.o +OBJS = istepdispatcher.o initsvcudistep.o ## SUBDIRS = test.d |