diff options
Diffstat (limited to 'src/usr/initservice')
-rw-r--r-- | src/usr/initservice/plugins/INITSVC_COMP_ID_Parse.C | 33 | ||||
-rw-r--r-- | src/usr/initservice/plugins/initsvcParse.C | 31 | ||||
-rw-r--r-- | src/usr/initservice/plugins/initsvcudistep.H | 99 | ||||
-rw-r--r-- | src/usr/initservice/plugins/initsvcudparserfactory.H | 66 | ||||
-rw-r--r-- | src/usr/initservice/plugins/makefile | 49 |
5 files changed, 198 insertions, 80 deletions
diff --git a/src/usr/initservice/plugins/INITSVC_COMP_ID_Parse.C b/src/usr/initservice/plugins/INITSVC_COMP_ID_Parse.C new file mode 100644 index 000000000..fbc50cab1 --- /dev/null +++ b/src/usr/initservice/plugins/INITSVC_COMP_ID_Parse.C @@ -0,0 +1,33 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/initservice/plugins/INITSVC_COMP_ID_Parse.C $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,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 */ +/** + * @file INITSVC_COMP_ID_Parse.C + * + * Initservice user data parser + */ +#include "errludparser.H" +#include "initsvcudparserfactory.H" + +ERRL_MAKE_UD_PARSER(INITSERVICE::InitSvcUserDetailsParserFactory, + hbfw::INITSVC_COMP_ID) + diff --git a/src/usr/initservice/plugins/initsvcParse.C b/src/usr/initservice/plugins/initsvcParse.C deleted file mode 100644 index e8894ca4e..000000000 --- a/src/usr/initservice/plugins/initsvcParse.C +++ /dev/null @@ -1,31 +0,0 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/usr/initservice/plugins/initsvcParse.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 initsvcParse.C - * - * Initservice user data parser - */ -#include <errl/errludparser.H> -#include <initservice/initsvcudparserfactory.H> -ERRL_MAKE_UD_PARSER(INITSERVICE::InitSvcUserDetailsParserFactory, INITSVC_COMP_ID) - diff --git a/src/usr/initservice/plugins/initsvcudistep.H b/src/usr/initservice/plugins/initsvcudistep.H new file mode 100644 index 000000000..02dcace60 --- /dev/null +++ b/src/usr/initservice/plugins/initsvcudistep.H @@ -0,0 +1,99 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/initservice/plugins/initsvcudistep.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,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 */ +#ifndef INITSVC_UDSTEP_H +#define INITSVC_UDSTEP_H + +/** + * @file initsvcudistep.H + * + * Defines the InitSvcUserDetailsParserIstep class that parses + * IStep FFDC user detail in an error log + */ + +#include "errluserdetails.H" + +namespace INITSERVICE +{ + +/** + * @struct InitSvcUserDetailsIstepData + * + * Defines the user detail data + */ +struct InitSvcUserDetailsIstepData +{ + uint16_t iv_step; + uint16_t iv_substep; + char iv_pIstepname[0]; +}; + +/** + * @class InitSvcUserDetailsParserIstep + * + * Parses Istep user detail in an error log +*/ +class InitSvcUserDetailsParserIstep : public ERRORLOG::ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + InitSvcUserDetailsParserIstep() {} + + /** + * @brief Destructor + */ + virtual ~InitSvcUserDetailsParserIstep() {} + + /** + * @brief Parses Istep user detail data from an error log + * + * @param i_version Version of the data + * @param i_parse ErrlUsrParser object for outputting information + * @param i_pBuffer Pointer to buffer containing detail data + * @param i_buflen Length of the buffer + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const + { + InitSvcUserDetailsIstepData * l_pData = + static_cast<InitSvcUserDetailsIstepData *>(i_pBuffer); + + i_parser.PrintString("IStep name", l_pData->iv_pIstepname); + i_parser.PrintNumber("Step", "%d", ntohs(l_pData->iv_step)); + i_parser.PrintNumber("Sub-step", "%d", ntohs(l_pData->iv_substep)); + } + +private: + // Disabled + InitSvcUserDetailsParserIstep(const InitSvcUserDetailsParserIstep &); + InitSvcUserDetailsParserIstep & operator=( + const InitSvcUserDetailsParserIstep &); +}; + +} + +#endif + diff --git a/src/usr/initservice/plugins/initsvcudparserfactory.H b/src/usr/initservice/plugins/initsvcudparserfactory.H new file mode 100644 index 000000000..d97cb31c6 --- /dev/null +++ b/src/usr/initservice/plugins/initsvcudparserfactory.H @@ -0,0 +1,66 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/initservice/plugins/initsvcudparserfactory.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012,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 */ +#ifndef INITSVC_UDPARSERFACTORY_H +#define INITSVC_UDPARSERFACTORY_H + +/** + * @file initsvcudparserfactory.H + * + * Defines the InitSvcUserDetailsParserFactory.H class + */ +#include "errludparserfactory.H" +#include "initsvcudistep.H" + +namespace INITSERVICE +{ + +/** + * @class InitSvcUserDetailsParserFactory + * + * This factory produces ErrlUserDetailsParser objects to parse the specified + * InitService user detail data. +*/ +class InitSvcUserDetailsParserFactory : public ERRORLOG::ErrlUserDetailsParserFactory +{ +public: + + /** + * @brief Constructor + */ + InitSvcUserDetailsParserFactory() + { + registerParser<InitSvcUserDetailsParserIstep>(INIT_SVC_UDT_ISTEP); + } + +private: + + // Disabled + InitSvcUserDetailsParserFactory(const InitSvcUserDetailsParserFactory &); + InitSvcUserDetailsParserFactory & operator=( + const InitSvcUserDetailsParserFactory &); +}; + +} + +#endif + diff --git a/src/usr/initservice/plugins/makefile b/src/usr/initservice/plugins/makefile deleted file mode 100644 index b2583f58d..000000000 --- a/src/usr/initservice/plugins/makefile +++ /dev/null @@ -1,49 +0,0 @@ -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# $Source: src/usr/initservice/plugins/makefile $ -# -# 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 - -# This is a FipS makefile. - - -# Include the common hostboot plugins makefile -.include "../plugins.mk" - -MY_PLUGIN = libB-0500 -MY_OBJS = initsvcParse.o - -.if ( $(CONTEXT) == "x86.nfp" ) - -LIBRARIES = ${MY_PLUGIN}.a -EXPLIBS = ${MY_PLUGIN}.a -${MY_PLUGIN}.a_OFILES = ${MY_OBJS} - -.else - -BUILD_SHARED_OBJS = -SHARED_LIBRARIES EXPSHLIBS = ${MY_PLUGIN}.so -${MY_PLUGIN}.so_EXTRA_LIBS = libbase.so -${MY_PLUGIN}.so_SHLDFLAGS += ${SHLDFLAGS} -Wl,-soname,${.TARGET} -${MY_PLUGIN}.so_OFILES = ${MY_OBJS} - -.endif - -.include <${RULES_MK}> |