diff options
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-daemons/openhpi')
22 files changed, 2149 insertions, 0 deletions
diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Fix-build-failures-with-gcc7.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Fix-build-failures-with-gcc7.patch new file mode 100644 index 000000000..4f493f7b8 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Fix-build-failures-with-gcc7.patch @@ -0,0 +1,49 @@ +From 398c6db66c643ed6133cc2b028ab1e27a17c5295 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 1 May 2017 19:10:09 +0000 +Subject: [PATCH] Fix build failures with gcc7 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + plugins/ipmidirect/ipmi_mc_vendor.cpp | 2 +- + plugins/ipmidirect/ipmi_resource.cpp | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/plugins/ipmidirect/ipmi_mc_vendor.cpp b/plugins/ipmidirect/ipmi_mc_vendor.cpp +index 2c6c090..557771c 100644 +--- a/plugins/ipmidirect/ipmi_mc_vendor.cpp ++++ b/plugins/ipmidirect/ipmi_mc_vendor.cpp +@@ -322,7 +322,7 @@ cIpmiMcVendor::CreateResources( cIpmiDomain *domain, cIpmiMc *source_mc, cIpmiSd + if ( addr.m_channel != source_mc->GetChannel() ) + stdlog << "WARNING : SDR channel " << addr.m_channel << " NOT equal to MC channel " << source_mc->GetChannel() << "\n"; + +- if ( FindOrCreateResource( domain, source_mc, fru_id, sdr, sdrs ) == false ) { ++ if ( !FindOrCreateResource( domain, source_mc, fru_id, sdr, sdrs ) ) { + return false; + } + } +diff --git a/plugins/ipmidirect/ipmi_resource.cpp b/plugins/ipmidirect/ipmi_resource.cpp +index c438e74..2552673 100644 +--- a/plugins/ipmidirect/ipmi_resource.cpp ++++ b/plugins/ipmidirect/ipmi_resource.cpp +@@ -73,7 +73,7 @@ cIpmiResource::SendCommandReadLock( const cIpmiMsg &msg, cIpmiMsg &rsp, + + domain->ReadLock(); + +- if ( domain->VerifyResource( resource ) == false ) ++ if ( !domain->VerifyResource( resource ) ) + return SA_ERR_HPI_NOT_PRESENT; + + return rv; +@@ -91,7 +91,7 @@ cIpmiResource::SendCommandReadLock( cIpmiRdr *rdr, const cIpmiMsg &msg, cIpmiMsg + + domain->ReadLock(); + +- if ( domain->VerifyRdr( rdr ) == false ) ++ if ( !domain->VerifyRdr( rdr ) ) + return SA_ERR_HPI_NOT_PRESENT; + + return rv; +-- +1.9.1 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch new file mode 100644 index 000000000..4d56f6535 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch @@ -0,0 +1,31 @@ +From be40b3f11460cf495bbbef45692e7763afda0c2b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 14 Sep 2017 17:56:31 -0700 +Subject: [PATCH] ipmidirect: Replace __STRING + +__STRING is not universally available e.g. +musl does not define it + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + plugins/ipmidirect/t/test.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/ipmidirect/t/test.h b/plugins/ipmidirect/t/test.h +index 8d71381..978d5ff 100644 +--- a/plugins/ipmidirect/t/test.h ++++ b/plugins/ipmidirect/t/test.h +@@ -22,7 +22,7 @@ TestFunction( const char *str, const char *file, int line, bool expr ) + } + + +-#define Test(expr) TestFunction( __STRING(expr), __FILE__, __LINE__, expr ) ++#define Test(expr) TestFunction( #expr, __FILE__, __LINE__, expr ) + + + static int +-- +2.14.1 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch new file mode 100644 index 000000000..0f033ac85 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch @@ -0,0 +1,47 @@ +From be665d9513cca7e8b64c79ae424cf44ac166b052 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 14 Sep 2017 17:07:58 -0700 +Subject: [PATCH] plugins: Check for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP + before use + +musl does not define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP +so we can not assume that all Linux systems support PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP +its a glibc specific define so check for it being defined before using it + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + plugins/dynamic_simulator/thread.cpp | 2 +- + plugins/ipmidirect/thread.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/dynamic_simulator/thread.cpp b/plugins/dynamic_simulator/thread.cpp +index d663be0..9210fd7 100644 +--- a/plugins/dynamic_simulator/thread.cpp ++++ b/plugins/dynamic_simulator/thread.cpp +@@ -229,7 +229,7 @@ cThread::Exit( void *rv ) + /** + * Constructor + **/ +-#if ( defined(__sun) && defined(__SVR4) ) || defined(__FreeBSD__) ++#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP + cThreadLock::cThreadLock() + { + pthread_mutexattr_t attr; +diff --git a/plugins/ipmidirect/thread.cpp b/plugins/ipmidirect/thread.cpp +index 5c52557..48e83fa 100644 +--- a/plugins/ipmidirect/thread.cpp ++++ b/plugins/ipmidirect/thread.cpp +@@ -167,7 +167,7 @@ cThread::Exit( void *rv ) + // cThreadLock + ////////////////////////////////////////////////// + +-#if ( defined(__sun) && defined(__SVR4) ) || defined(__FreeBSD__) ++#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP + cThreadLock::cThreadLock() + { + pthread_mutexattr_t attr; +-- +2.14.1 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch new file mode 100644 index 000000000..0549d5977 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch @@ -0,0 +1,12 @@ +Index: openhpi-3.6.1/configure.ac +=================================================================== +--- openhpi-3.6.1.orig/configure.ac ++++ openhpi-3.6.1/configure.ac +@@ -44,6 +44,7 @@ AC_PROG_CPP + AC_PROG_INSTALL + AC_PROG_LN_S + AC_PROG_MAKE_SET ++AX_CXX_COMPILE_STDCXX_11([noext],[mandatory]) + + enabled_non32bit="no" + AC_ARG_ENABLE([non32bit-int], diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch new file mode 100644 index 000000000..9b35a0cce --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch @@ -0,0 +1,1288 @@ +Index: openhpi-3.6.1/plugins/dynamic_simulator/new_sim.cpp +=================================================================== +--- openhpi-3.6.1.orig/plugins/dynamic_simulator/new_sim.cpp ++++ openhpi-3.6.1/plugins/dynamic_simulator/new_sim.cpp +@@ -415,7 +415,7 @@ extern "C" { + /** + * Alias for @ref öh_open(), implemented by @ref NewSimulatorOpen(). + **/ +-static void * NewSimulatorOpen( GHashTable *, unsigned int, oh_evt_queue * ) __attribute__((used)); ++static void * NewSimulatorOpen( GHashTable *, unsigned int, oh_evt_queue * ) __asm__("NewSimulatorOpen") __attribute__((used)); + + /** + * @fn NewSimulatorOpen( GHashTable *handler_config, unsigned int hid, +@@ -530,7 +530,7 @@ static void * NewSimulatorOpen( GHashTab + /** + * Alias for @ref öh_close(), implemented by @ref NewSimulatorClose(). + **/ +-static void NewSimulatorClose( void * ) __attribute__((used)); ++static void NewSimulatorClose( void * ) __asm__("NewSimulatorClose") __attribute__((used)); + + /** + * @relate NewSimulatorClose +@@ -585,7 +585,7 @@ static void NewSimulatorClose( void *hnd + * + * @return HPI error code + **/ +-static SaErrorT NewSimulatorGetEvent( void * ) __attribute__((used)); ++static SaErrorT NewSimulatorGetEvent( void * ) __asm__("NewSimulatorGetEvent") __attribute__((used)); + + static SaErrorT NewSimulatorGetEvent( void *hnd ) { + dbg( "NewSimulatorGetEvent" ); +@@ -613,7 +613,7 @@ static SaErrorT NewSimulatorGetEvent( vo + * + * @return HPI error code + **/ +-static SaErrorT NewSimulatorDiscoverResources( void * ) __attribute__((used)); ++static SaErrorT NewSimulatorDiscoverResources( void * ) __asm__("NewSimulatorDiscoverResources") __attribute__((used)); + + static SaErrorT NewSimulatorDiscoverResources( void *hnd ) { + dbg( "NewSimulatorDiscoverResources" ); +@@ -641,7 +641,7 @@ static SaErrorT NewSimulatorDiscoverReso + * + * @return HPI error code + **/ +-static SaErrorT NewSimulatorSetResourceTag( void *, SaHpiResourceIdT, SaHpiTextBufferT * ) __attribute__((used)); ++static SaErrorT NewSimulatorSetResourceTag( void *, SaHpiResourceIdT, SaHpiTextBufferT * ) __asm__("NewSimulatorSetResourceTag") __attribute__((used)); + + static SaErrorT NewSimulatorSetResourceTag( void *hnd, SaHpiResourceIdT id, + SaHpiTextBufferT *tag ) { +@@ -669,7 +669,7 @@ static SaErrorT NewSimulatorSetResourceT + * + * @return HPI error code + **/ +-static SaErrorT NewSimulatorSetResourceSeverity( void *, SaHpiResourceIdT, SaHpiSeverityT ) __attribute__((used)); ++static SaErrorT NewSimulatorSetResourceSeverity( void *, SaHpiResourceIdT, SaHpiSeverityT ) __asm__("NewSimulatorSetResourceSeverity") __attribute__((used)); + + static SaErrorT NewSimulatorSetResourceSeverity( void *hnd, SaHpiResourceIdT id, + SaHpiSeverityT sev ) { +@@ -703,7 +703,7 @@ static SaErrorT NewSimulatorGetSensorRea + SaHpiResourceIdT id, + SaHpiSensorNumT num, + SaHpiSensorReadingT *data, +- SaHpiEventStateT *state ) __attribute__((used)); ++ SaHpiEventStateT *state ) __asm__("NewSimulatorGetSensorReading") __attribute__((used)); + + static SaErrorT NewSimulatorGetSensorReading( void *hnd, + SaHpiResourceIdT id, +@@ -738,7 +738,7 @@ static SaErrorT NewSimulatorGetSensorRea + static SaErrorT NewSimulatorGetSensorThresholds( void *hnd, + SaHpiResourceIdT, + SaHpiSensorNumT, +- SaHpiSensorThresholdsT * ) __attribute__((used)); ++ SaHpiSensorThresholdsT * ) __asm__("NewSimulatorGetSensorThresholds") __attribute__((used)); + + static SaErrorT NewSimulatorGetSensorThresholds( void *hnd, + SaHpiResourceIdT id, +@@ -777,7 +777,7 @@ static SaErrorT NewSimulatorGetSensorThr + static SaErrorT NewSimulatorSetSensorThresholds( void *, + SaHpiResourceIdT, + SaHpiSensorNumT, +- const SaHpiSensorThresholdsT * ) __attribute__((used)); ++ const SaHpiSensorThresholdsT * ) __asm__("NewSimulatorSetSensorThresholds") __attribute__((used)); + + static SaErrorT NewSimulatorSetSensorThresholds( void *hnd, + SaHpiResourceIdT id, +@@ -815,7 +815,7 @@ static SaErrorT NewSimulatorSetSensorThr + static SaErrorT NewSimulatorGetSensorEnable( void *, + SaHpiResourceIdT, + SaHpiSensorNumT, +- SaHpiBoolT * ) __attribute__((used)); ++ SaHpiBoolT * ) __asm__("NewSimulatorGetSensorEnable") __attribute__((used)); + + static SaErrorT NewSimulatorGetSensorEnable( void *hnd, + SaHpiResourceIdT id, +@@ -849,7 +849,7 @@ static SaErrorT NewSimulatorGetSensorEna + static SaErrorT NewSimulatorSetSensorEnable( void *, + SaHpiResourceIdT, + SaHpiSensorNumT, +- SaHpiBoolT ) __attribute__((used)); ++ SaHpiBoolT ) __asm__("NewSimulatorSetSensorEnable") __attribute__((used)); + + static SaErrorT NewSimulatorSetSensorEnable( void *hnd, + SaHpiResourceIdT id, +@@ -883,7 +883,7 @@ static SaErrorT NewSimulatorSetSensorEna + static SaErrorT NewSimulatorGetSensorEventEnables( void *, + SaHpiResourceIdT, + SaHpiSensorNumT, +- SaHpiBoolT * ) __attribute__((used)); ++ SaHpiBoolT * ) __asm__("NewSimulatorGetSensorEventEnables") __attribute__((used)); + + static SaErrorT NewSimulatorGetSensorEventEnables( void *hnd, + SaHpiResourceIdT id, +@@ -916,7 +916,7 @@ static SaErrorT NewSimulatorGetSensorEve + static SaErrorT NewSimulatorSetSensorEventEnables( void *, + SaHpiResourceIdT, + SaHpiSensorNumT, +- SaHpiBoolT ) __attribute__((used)); ++ SaHpiBoolT ) __asm__("NewSimulatorSetSensorEventEnables") __attribute__((used)); + + static SaErrorT NewSimulatorSetSensorEventEnables( void *hnd, + SaHpiResourceIdT id, +@@ -952,7 +952,7 @@ static SaErrorT NewSimulatorGetSensorEve + SaHpiResourceIdT, + SaHpiSensorNumT, + SaHpiEventStateT *, +- SaHpiEventStateT * ) __attribute__((used)); ++ SaHpiEventStateT * ) __asm__("NewSimulatorGetSensorEventMasks") __attribute__((used)); + + static SaErrorT NewSimulatorGetSensorEventMasks( void *hnd, + SaHpiResourceIdT id, +@@ -990,7 +990,7 @@ static SaErrorT NewSimulatorSetSensorEve + SaHpiSensorNumT, + SaHpiSensorEventMaskActionT, + SaHpiEventStateT, +- SaHpiEventStateT ) __attribute__((used)); ++ SaHpiEventStateT ) __asm__("NewSimulatorSetSensorEventMasks") __attribute__((used)); + + static SaErrorT NewSimulatorSetSensorEventMasks( void *hnd, + SaHpiResourceIdT id, +@@ -1026,7 +1026,7 @@ static SaErrorT NewSimulatorSetSensorEve + static SaErrorT NewSimulatorGetControlState( void *, SaHpiResourceIdT, + SaHpiCtrlNumT, + SaHpiCtrlModeT *, +- SaHpiCtrlStateT * ) __attribute__((used)); ++ SaHpiCtrlStateT * ) __asm__("NewSimulatorGetControlState") __attribute__((used)); + + static SaErrorT NewSimulatorGetControlState( void *hnd, SaHpiResourceIdT id, + SaHpiCtrlNumT num, +@@ -1061,7 +1061,7 @@ static SaErrorT NewSimulatorGetControlSt + static SaErrorT NewSimulatorSetControlState( void *, SaHpiResourceIdT, + SaHpiCtrlNumT, + SaHpiCtrlModeT, +- SaHpiCtrlStateT * ) __attribute__((used)); ++ SaHpiCtrlStateT * ) __asm__("NewSimulatorSetControlState") __attribute__((used)); + + static SaErrorT NewSimulatorSetControlState( void *hnd, SaHpiResourceIdT id, + SaHpiCtrlNumT num, +@@ -1099,7 +1099,7 @@ static SaErrorT NewSimulatorGetNextAnnou + SaHpiAnnunciatorNumT, + SaHpiSeverityT, + SaHpiBoolT, +- SaHpiAnnouncementT *) __attribute__((used)); ++ SaHpiAnnouncementT *) __asm__("NewSimulatorGetNextAnnouncement") __attribute__((used)); + + static SaErrorT NewSimulatorGetNextAnnouncement(void *hnd, SaHpiResourceIdT id, + SaHpiAnnunciatorNumT num, +@@ -1135,7 +1135,7 @@ static SaErrorT NewSimulatorGetNextAnnou + static SaErrorT NewSimulatorGetAnnouncement(void *, SaHpiResourceIdT, + SaHpiAnnunciatorNumT, + SaHpiEntryIdT, +- SaHpiAnnouncementT *) __attribute__((used)); ++ SaHpiAnnouncementT *) __asm__("NewSimulatorGetAnnouncement") __attribute__((used)); + + static SaErrorT NewSimulatorGetAnnouncement(void *hnd, SaHpiResourceIdT id, + SaHpiAnnunciatorNumT num, +@@ -1171,7 +1171,7 @@ static SaErrorT NewSimulatorGetAnnouncem + static SaErrorT NewSimulatorAckAnnouncement(void *, SaHpiResourceIdT, + SaHpiAnnunciatorNumT, + SaHpiEntryIdT, +- SaHpiSeverityT) __attribute__((used)); ++ SaHpiSeverityT) __asm__("NewSimulatorAckAnnouncement") __attribute__((used)); + + static SaErrorT NewSimulatorAckAnnouncement(void *hnd, SaHpiResourceIdT id, + SaHpiAnnunciatorNumT num, +@@ -1205,7 +1205,7 @@ static SaErrorT NewSimulatorAckAnnouncem + **/ + static SaErrorT NewSimulatorAddAnnouncement(void *, SaHpiResourceIdT, + SaHpiAnnunciatorNumT, +- SaHpiAnnouncementT *) __attribute__((used)); ++ SaHpiAnnouncementT *) __asm__("NewSimulatorAddAnnouncement") __attribute__((used)); + + static SaErrorT NewSimulatorAddAnnouncement(void *hnd, SaHpiResourceIdT id, + SaHpiAnnunciatorNumT num, +@@ -1239,7 +1239,7 @@ static SaErrorT NewSimulatorAddAnnouncem + static SaErrorT NewSimulatorDelAnnouncement(void *, SaHpiResourceIdT, + SaHpiAnnunciatorNumT, + SaHpiEntryIdT, +- SaHpiSeverityT) __attribute__((used)); ++ SaHpiSeverityT) __asm__("NewSimulatorDelAnnouncement") __attribute__((used)); + + static SaErrorT NewSimulatorDelAnnouncement(void *hnd, SaHpiResourceIdT id, + SaHpiAnnunciatorNumT num, +@@ -1273,7 +1273,7 @@ static SaErrorT NewSimulatorDelAnnouncem + **/ + static SaErrorT NewSimulatorGetAnnMode(void *, SaHpiResourceIdT, + SaHpiAnnunciatorNumT, +- SaHpiAnnunciatorModeT *) __attribute__((used)); ++ SaHpiAnnunciatorModeT *) __asm__("NewSimulatorGetAnnMode") __attribute__((used)); + + static SaErrorT NewSimulatorGetAnnMode(void *hnd, SaHpiResourceIdT id, + SaHpiAnnunciatorNumT num, +@@ -1306,7 +1306,7 @@ static SaErrorT NewSimulatorGetAnnMode(v + **/ + static SaErrorT NewSimulatorSetAnnMode(void *, SaHpiResourceIdT, + SaHpiAnnunciatorNumT, +- SaHpiAnnunciatorModeT) __attribute__((used)); ++ SaHpiAnnunciatorModeT) __asm__("NewSimulatorSetAnnMode") __attribute__((used)); + + static SaErrorT NewSimulatorSetAnnMode(void *hnd, SaHpiResourceIdT id, + SaHpiAnnunciatorNumT num, +@@ -1340,7 +1340,7 @@ static SaErrorT NewSimulatorSetAnnMode(v + static SaErrorT NewSimulatorGetIdrInfo( void *, + SaHpiResourceIdT, + SaHpiIdrIdT, +- SaHpiIdrInfoT * ) __attribute__((used)); ++ SaHpiIdrInfoT * ) __asm__("NewSimulatorGetIdrInfo") __attribute__((used)); + + static SaErrorT NewSimulatorGetIdrInfo( void *hnd, + SaHpiResourceIdT id, +@@ -1380,7 +1380,7 @@ static SaErrorT NewSimulatorGetIdrAreaHe + SaHpiIdrAreaTypeT, + SaHpiEntryIdT, + SaHpiEntryIdT *, +- SaHpiIdrAreaHeaderT * ) __attribute__((used)); ++ SaHpiIdrAreaHeaderT * ) __asm__("NewSimulatorGetIdrAreaHeader") __attribute__((used)); + + static SaErrorT NewSimulatorGetIdrAreaHeader( void *hnd, + SaHpiResourceIdT id, +@@ -1419,7 +1419,7 @@ static SaErrorT NewSimulatorAddIdrArea( + SaHpiResourceIdT, + SaHpiIdrIdT, + SaHpiIdrAreaTypeT, +- SaHpiEntryIdT * ) __attribute__((used)); ++ SaHpiEntryIdT * ) __asm__("NewSimulatorAddIdrArea") __attribute__((used)); + + static SaErrorT NewSimulatorAddIdrArea( void *hnd, + SaHpiResourceIdT id, +@@ -1456,7 +1456,7 @@ static SaErrorT NewSimulatorAddIdrAreaBy + SaHpiResourceIdT, + SaHpiIdrIdT, + SaHpiIdrAreaTypeT, +- SaHpiEntryIdT ) __attribute__((used)); ++ SaHpiEntryIdT ) __asm__("NewSimulatorAddIdrAreaById") __attribute__((used)); + + static SaErrorT NewSimulatorAddIdrAreaById( void *hnd, + SaHpiResourceIdT id, +@@ -1490,7 +1490,7 @@ static SaErrorT NewSimulatorAddIdrAreaBy + static SaErrorT NewSimulatorDelIdrArea( void *, + SaHpiResourceIdT, + SaHpiIdrIdT, +- SaHpiEntryIdT ) __attribute__((used)); ++ SaHpiEntryIdT ) __asm__("NewSimulatorDelIdrArea") __attribute__((used)); + + static SaErrorT NewSimulatorDelIdrArea( void *hnd, + SaHpiResourceIdT id, +@@ -1532,7 +1532,7 @@ static SaErrorT NewSimulatorGetIdrField( + SaHpiIdrFieldTypeT, + SaHpiEntryIdT, + SaHpiEntryIdT *, +- SaHpiIdrFieldT * ) __attribute__((used)); ++ SaHpiIdrFieldT * ) __asm__("NewSimulatorGetIdrField") __attribute__((used)); + + static SaErrorT NewSimulatorGetIdrField( void *hnd, + SaHpiResourceIdT id, +@@ -1570,7 +1570,7 @@ static SaErrorT NewSimulatorGetIdrField( + static SaErrorT NewSimulatorAddIdrField( void *, + SaHpiResourceIdT, + SaHpiIdrIdT, +- SaHpiIdrFieldT * ) __attribute__((used)); ++ SaHpiIdrFieldT * ) __asm__("NewSimulatorAddIdrField") __attribute__((used)); + + static SaErrorT NewSimulatorAddIdrField( void *hnd, + SaHpiResourceIdT id, +@@ -1604,7 +1604,7 @@ static SaErrorT NewSimulatorAddIdrField( + static SaErrorT NewSimulatorAddIdrFieldById( void *, + SaHpiResourceIdT, + SaHpiIdrIdT, +- SaHpiIdrFieldT * ) __attribute__((used)); ++ SaHpiIdrFieldT * ) __asm__("NewSimulatorAddIdrFieldById") __attribute__((used)); + + static SaErrorT NewSimulatorAddIdrFieldById( void *hnd, + SaHpiResourceIdT id, +@@ -1637,7 +1637,7 @@ static SaErrorT NewSimulatorAddIdrFieldB + static SaErrorT NewSimulatorSetIdrField( void *, + SaHpiResourceIdT, + SaHpiIdrIdT, +- SaHpiIdrFieldT * ) __attribute__((used)); ++ SaHpiIdrFieldT * ) __asm__("NewSimulatorSetIdrField") __attribute__((used)); + + static SaErrorT NewSimulatorSetIdrField( void *hnd, + SaHpiResourceIdT id, +@@ -1672,7 +1672,7 @@ static SaErrorT NewSimulatorDelIdrField( + SaHpiResourceIdT, + SaHpiIdrIdT, + SaHpiEntryIdT, +- SaHpiEntryIdT ) __attribute__((used)); ++ SaHpiEntryIdT ) __asm__("NewSimulatorDelIdrField") __attribute__((used)); + + static SaErrorT NewSimulatorDelIdrField( void *hnd, + SaHpiResourceIdT id, +@@ -1704,7 +1704,7 @@ static SaErrorT NewSimulatorDelIdrField( + **/ + static SaErrorT NewSimulatorGetSelInfo( void *, + SaHpiResourceIdT, +- SaHpiEventLogInfoT * ) __attribute__((used)); ++ SaHpiEventLogInfoT * ) __asm__("NewSimulatorGetSelInfo") __attribute__((used)); + + static SaErrorT NewSimulatorGetSelInfo( void *hnd, + SaHpiResourceIdT id, +@@ -1736,7 +1736,7 @@ static SaErrorT NewSimulatorGetSelInfo( + * + * @return HPI error code + **/ +-static SaErrorT NewSimulatorSetSelTime( void *, SaHpiResourceIdT, SaHpiTimeT ) __attribute__((used)); ++static SaErrorT NewSimulatorSetSelTime( void *, SaHpiResourceIdT, SaHpiTimeT ) __asm__("NewSimulatorSetSelTime") __attribute__((used)); + + static SaErrorT NewSimulatorSetSelTime( void *hnd, SaHpiResourceIdT id, SaHpiTimeT t ) { + SaErrorT rv = SA_ERR_HPI_INTERNAL_ERROR; +@@ -1766,7 +1766,7 @@ static SaErrorT NewSimulatorSetSelTime( + * + * @return HPI error code + **/ +-static SaErrorT NewSimulatorAddSelEntry( void *, SaHpiResourceIdT, const SaHpiEventT * ) __attribute__((used)); ++static SaErrorT NewSimulatorAddSelEntry( void *, SaHpiResourceIdT, const SaHpiEventT * ) __asm__("NewSimulatorAddSelEntry") __attribute__((used)); + + static SaErrorT NewSimulatorAddSelEntry( void *hnd, SaHpiResourceIdT id, + const SaHpiEventT *Event ) { +@@ -1809,7 +1809,7 @@ static SaErrorT NewSimulatorGetSelEntry( + SaHpiEventLogEntryIdT *, + SaHpiEventLogEntryT *, + SaHpiRdrT *, +- SaHpiRptEntryT * ) __attribute__((used)); ++ SaHpiRptEntryT * ) __asm__("NewSimulatorGetSelEntry") __attribute__((used)); + + static SaErrorT NewSimulatorGetSelEntry( void *hnd, SaHpiResourceIdT id, + SaHpiEventLogEntryIdT current, +@@ -1844,7 +1844,7 @@ static SaErrorT NewSimulatorGetSelEntry( + * + * @return HPI error code + **/ +-static SaErrorT NewSimulatorClearSel( void *, SaHpiResourceIdT ) __attribute__((used)); ++static SaErrorT NewSimulatorClearSel( void *, SaHpiResourceIdT ) __asm__("NewSimulatorClearSel") __attribute__((used)); + + static SaErrorT NewSimulatorClearSel( void *hnd, SaHpiResourceIdT id ) { + SaErrorT rv = SA_ERR_HPI_INTERNAL_ERROR; +@@ -1875,7 +1875,7 @@ static SaErrorT NewSimulatorClearSel( vo + * @return HPI error code + **/ + static SaErrorT NewSimulatorSetSelState(void *, SaHpiResourceIdT, +- SaHpiBoolT) __attribute__((used)); ++ SaHpiBoolT) __asm__("NewSimulatorSetSelState") __attribute__((used)); + + static SaErrorT NewSimulatorSetSelState( void *hnd, SaHpiResourceIdT id, + SaHpiBoolT state ) { +@@ -1907,7 +1907,7 @@ static SaErrorT NewSimulatorSetSelState( + * @return HPI error code + **/ + static SaErrorT NewSimulatorGetSelState(void *, SaHpiResourceIdT, +- SaHpiBoolT *) __attribute__((used)); ++ SaHpiBoolT *) __asm__("NewSimulatorGetSelState") __attribute__((used)); + + static SaErrorT NewSimulatorGetSelState( void *hnd, SaHpiResourceIdT id, + SaHpiBoolT *state ) { +@@ -1939,7 +1939,7 @@ static SaErrorT NewSimulatorGetSelState( + * @return HPI error code + **/ + static SaErrorT NewSimulatorGetSelCapability(void *, SaHpiResourceIdT, +- SaHpiEventLogCapabilitiesT *) __attribute__((used)); ++ SaHpiEventLogCapabilitiesT *) __asm__("NewSimulatorGetSelCapability") __attribute__((used)); + + static SaErrorT NewSimulatorGetSelCapability( void *hnd, SaHpiResourceIdT id, + SaHpiEventLogCapabilitiesT *caps ) { +@@ -1970,7 +1970,7 @@ static SaErrorT NewSimulatorGetSelCapabi + * @return HPI error code + **/ + static SaErrorT NewSimulatorResetSelOverflow(void *, SaHpiResourceIdT) +- __attribute__((used)); ++ __asm__("NewSimulatorResetSelOverflow") __attribute__((used)); + + static SaErrorT NewSimulatorResetSelOverflow( void *hnd, SaHpiResourceIdT id ) { + +@@ -2002,7 +2002,7 @@ static SaErrorT NewSimulatorResetSelOver + * @return HPI error code + **/ + static SaErrorT NewSimulatorHotswapPolicyCancel( void *, SaHpiResourceIdT, +- SaHpiTimeoutT ) __attribute__((used)); ++ SaHpiTimeoutT ) __asm__("NewSimulatorHotswapPolicyCancel") __attribute__((used)); + + static SaErrorT NewSimulatorHotswapPolicyCancel( void *hnd, SaHpiResourceIdT id, + SaHpiTimeoutT timeout) { +@@ -2032,7 +2032,7 @@ static SaErrorT NewSimulatorHotswapPolic + * @return HPI error code + **/ + static SaErrorT NewSimulatorGetHotswapState( void *, SaHpiResourceIdT , +- SaHpiHsStateT * ) __attribute__((used)); ++ SaHpiHsStateT * ) __asm__("NewSimulatorGetHotswapState") __attribute__((used)); + + static SaErrorT NewSimulatorGetHotswapState( void *hnd, SaHpiResourceIdT id, + SaHpiHsStateT *state ) { +@@ -2063,7 +2063,7 @@ static SaErrorT NewSimulatorGetHotswapSt + * @return HPI error code + **/ + static SaErrorT NewSimulatorSetHotswapState( void *, SaHpiResourceIdT, +- SaHpiHsStateT ) __attribute__((used)); ++ SaHpiHsStateT ) __asm__("NewSimulatorSetHotswapState") __attribute__((used)); + + static SaErrorT NewSimulatorSetHotswapState( void *hnd, SaHpiResourceIdT id, + SaHpiHsStateT state ) { +@@ -2105,7 +2105,7 @@ static SaErrorT NewSimulatorSetHotswapSt + * @return HPI error code + **/ + static SaErrorT NewSimulatorRequestHotswapAction( void *, SaHpiResourceIdT, +- SaHpiHsActionT ) __attribute__((used)); ++ SaHpiHsActionT ) __asm__("NewSimulatorRequestHotswapAction") __attribute__((used)); + + static SaErrorT NewSimulatorRequestHotswapAction( void *hnd, SaHpiResourceIdT id, + SaHpiHsActionT act ) { +@@ -2139,7 +2139,7 @@ static SaErrorT NewSimulatorRequestHotsw + static SaErrorT NewSimulatorGetWatchdogInfo(void *, + SaHpiResourceIdT, + SaHpiWatchdogNumT, +- SaHpiWatchdogT *) __attribute__((used)); ++ SaHpiWatchdogT *) __asm__("NewSimulatorGetWatchdogInfo") __attribute__((used)); + + static SaErrorT NewSimulatorGetWatchdogInfo(void *hnd, + SaHpiResourceIdT id, +@@ -2170,7 +2170,7 @@ static SaErrorT NewSimulatorGetWatchdogI + static SaErrorT NewSimulatorSetWatchdogInfo(void *, + SaHpiResourceIdT, + SaHpiWatchdogNumT, +- SaHpiWatchdogT *) __attribute__((used)); ++ SaHpiWatchdogT *) __asm__("NewSimulatorSetWatchdogInfo") __attribute__((used)); + + static SaErrorT NewSimulatorSetWatchdogInfo(void *hnd, + SaHpiResourceIdT id, +@@ -2199,7 +2199,7 @@ static SaErrorT NewSimulatorSetWatchdogI + **/ + static SaErrorT NewSimulatorResetWatchdog(void *, + SaHpiResourceIdT, +- SaHpiWatchdogNumT) __attribute__((used)); ++ SaHpiWatchdogNumT) __asm__("NewSimulatorResetWatchdog") __attribute__((used)); + + static SaErrorT NewSimulatorResetWatchdog(void *hnd, + SaHpiResourceIdT id, +@@ -2229,7 +2229,7 @@ static SaErrorT NewSimulatorResetWatchdo + static SaErrorT NewSimulatorGetFumiSpec(void *, + SaHpiResourceIdT, + SaHpiFumiNumT, +- SaHpiFumiSpecInfoT *) __attribute__((used)); ++ SaHpiFumiSpecInfoT *) __asm__("NewSimulatorGetFumiSpec") __attribute__((used)); + + static SaErrorT NewSimulatorGetFumiSpec(void *hnd, + SaHpiResourceIdT id, +@@ -2260,7 +2260,7 @@ static SaErrorT NewSimulatorGetFumiSpec( + static SaErrorT NewSimulatorGetFumiServImpact(void *, + SaHpiResourceIdT, + SaHpiFumiNumT, +- SaHpiFumiServiceImpactDataT *) __attribute__((used)); ++ SaHpiFumiServiceImpactDataT *) __asm__("NewSimulatorGetFumiServImpact") __attribute__((used)); + + static SaErrorT NewSimulatorGetFumiServImpact(void *hnd, + SaHpiResourceIdT id, +@@ -2294,7 +2294,7 @@ static SaErrorT NewSimulatorSetFumiSourc + SaHpiResourceIdT, + SaHpiFumiNumT, + SaHpiBankNumT, +- SaHpiTextBufferT *) __attribute__((used)); ++ SaHpiTextBufferT *) __asm__("NewSimulatorSetFumiSource") __attribute__((used)); + + static SaErrorT NewSimulatorSetFumiSource(void *hnd, + SaHpiResourceIdT id, +@@ -2327,7 +2327,7 @@ static SaErrorT NewSimulatorSetFumiSourc + static SaErrorT NewSimulatorValidateFumiSource(void *, + SaHpiResourceIdT, + SaHpiFumiNumT, +- SaHpiBankNumT) __attribute__((used)); ++ SaHpiBankNumT) __asm__("NewSimulatorValidateFumiSource") __attribute__((used)); + + static SaErrorT NewSimulatorValidateFumiSource(void *hnd, + SaHpiResourceIdT id, +@@ -2361,7 +2361,7 @@ static SaErrorT NewSimulatorGetFumiSourc + SaHpiResourceIdT, + SaHpiFumiNumT, + SaHpiBankNumT, +- SaHpiFumiSourceInfoT *) __attribute__((used)); ++ SaHpiFumiSourceInfoT *) __asm__("NewSimulatorGetFumiSource") __attribute__((used)); + + static SaErrorT NewSimulatorGetFumiSource(void *hnd, + SaHpiResourceIdT id, +@@ -2400,7 +2400,7 @@ static SaErrorT NewSimulatorGetFumiSourc + SaHpiBankNumT, + SaHpiEntryIdT, + SaHpiEntryIdT *, +- SaHpiFumiComponentInfoT *) __attribute__((used)); ++ SaHpiFumiComponentInfoT *) __asm__("NewSimulatorGetFumiSourceComponent") __attribute__((used)); + + static SaErrorT NewSimulatorGetFumiSourceComponent(void *hnd, + SaHpiResourceIdT id, +@@ -2437,7 +2437,7 @@ static SaErrorT NewSimulatorGetFumiTarge + SaHpiResourceIdT, + SaHpiFumiNumT, + SaHpiBankNumT, +- SaHpiFumiBankInfoT *) __attribute__((used)); ++ SaHpiFumiBankInfoT *) __asm__("NewSimulatorGetFumiTarget") __attribute__((used)); + + static SaErrorT NewSimulatorGetFumiTarget(void *hnd, + SaHpiResourceIdT id, +@@ -2476,7 +2476,7 @@ static SaErrorT NewSimulatorGetFumiTarge + SaHpiBankNumT, + SaHpiEntryIdT, + SaHpiEntryIdT *, +- SaHpiFumiComponentInfoT *) __attribute__((used)); ++ SaHpiFumiComponentInfoT *) __asm__("NewSimulatorGetFumiTargetComponent") __attribute__((used)); + + static SaErrorT NewSimulatorGetFumiTargetComponent(void *hnd, + SaHpiResourceIdT id, +@@ -2511,7 +2511,7 @@ static SaErrorT NewSimulatorGetFumiTarge + static SaErrorT NewSimulatorGetFumiLogicalTarget(void *, + SaHpiResourceIdT, + SaHpiFumiNumT, +- SaHpiFumiLogicalBankInfoT *) __attribute__((used)); ++ SaHpiFumiLogicalBankInfoT *) __asm__("NewSimulatorGetFumiLogicalTarget") __attribute__((used)); + + static SaErrorT NewSimulatorGetFumiLogicalTarget(void *hnd, + SaHpiResourceIdT id, +@@ -2547,7 +2547,7 @@ static SaErrorT NewSimulatorGetFumiLogic + SaHpiFumiNumT, + SaHpiEntryIdT, + SaHpiEntryIdT *, +- SaHpiFumiLogicalComponentInfoT *) __attribute__((used)); ++ SaHpiFumiLogicalComponentInfoT *) __asm__("NewSimulatorGetFumiLogicalTargetComponent") __attribute__((used)); + + static SaErrorT NewSimulatorGetFumiLogicalTargetComponent(void *hnd, + SaHpiResourceIdT id, +@@ -2579,7 +2579,7 @@ static SaErrorT NewSimulatorGetFumiLogic + **/ + static SaErrorT NewSimulatorStartFumiBackup(void *, + SaHpiResourceIdT, +- SaHpiFumiNumT) __attribute__((used)); ++ SaHpiFumiNumT) __asm__("NewSimulatorStartFumiBackup") __attribute__((used)); + + static SaErrorT NewSimulatorStartFumiBackup(void *hnd, + SaHpiResourceIdT id, +@@ -2612,7 +2612,7 @@ static SaErrorT NewSimulatorSetFumiBankO + SaHpiResourceIdT, + SaHpiFumiNumT, + SaHpiBankNumT, +- SaHpiUint32T) __attribute__((used)); ++ SaHpiUint32T) __asm__("NewSimulatorSetFumiBankOrder") __attribute__((used)); + + static SaErrorT NewSimulatorSetFumiBankOrder(void *hnd, + SaHpiResourceIdT id, +@@ -2647,7 +2647,7 @@ static SaErrorT NewSimulatorStartFumiBan + SaHpiResourceIdT, + SaHpiFumiNumT, + SaHpiBankNumT, +- SaHpiBankNumT) __attribute__((used)); ++ SaHpiBankNumT) __asm__("NewSimulatorStartFumiBankCopy") __attribute__((used)); + + static SaErrorT NewSimulatorStartFumiBankCopy(void *hnd, + SaHpiResourceIdT id, +@@ -2680,7 +2680,7 @@ static SaErrorT NewSimulatorStartFumiBan + static SaErrorT NewSimulatorStartFumiInstall(void *, + SaHpiResourceIdT, + SaHpiFumiNumT, +- SaHpiBankNumT) __attribute__((used)); ++ SaHpiBankNumT) __asm__("NewSimulatorStartFumiInstall") __attribute__((used)); + + static SaErrorT NewSimulatorStartFumiInstall(void *hnd, + SaHpiResourceIdT id, +@@ -2714,7 +2714,7 @@ static SaErrorT NewSimulatorGetFumiStatu + SaHpiResourceIdT, + SaHpiFumiNumT, + SaHpiBankNumT, +- SaHpiFumiUpgradeStatusT *) __attribute__((used)); ++ SaHpiFumiUpgradeStatusT *) __asm__("NewSimulatorGetFumiStatus") __attribute__((used)); + + static SaErrorT NewSimulatorGetFumiStatus(void *hnd, + SaHpiResourceIdT id, +@@ -2747,7 +2747,7 @@ static SaErrorT NewSimulatorGetFumiStatu + static SaErrorT NewSimulatorStartFumiVerification(void *, + SaHpiResourceIdT, + SaHpiFumiNumT, +- SaHpiBankNumT) __attribute__((used)); ++ SaHpiBankNumT) __asm__("NewSimulatorStartFumiVerification") __attribute__((used)); + + static SaErrorT NewSimulatorStartFumiVerification(void *hnd, + SaHpiResourceIdT id, +@@ -2776,7 +2776,7 @@ static SaErrorT NewSimulatorStartFumiVer + **/ + static SaErrorT NewSimulatorStartFumiVerificationMain(void *, + SaHpiResourceIdT, +- SaHpiFumiNumT) __attribute__((used)); ++ SaHpiFumiNumT) __asm__("NewSimulatorStartFumiVerificationMain") __attribute__((used)); + + static SaErrorT NewSimulatorStartFumiVerificationMain(void *hnd, + SaHpiResourceIdT id, +@@ -2807,7 +2807,7 @@ static SaErrorT NewSimulatorStartFumiVer + static SaErrorT NewSimulatorCancelFumiUpgrade(void *, + SaHpiResourceIdT, + SaHpiFumiNumT, +- SaHpiBankNumT) __attribute__((used)); ++ SaHpiBankNumT) __asm__("NewSimulatorCancelFumiUpgrade") __attribute__((used)); + + static SaErrorT NewSimulatorCancelFumiUpgrade(void *hnd, + SaHpiResourceIdT id, +@@ -2838,7 +2838,7 @@ static SaErrorT NewSimulatorCancelFumiUp + static SaErrorT NewSimulatorGetFumiRollback(void *, + SaHpiResourceIdT, + SaHpiFumiNumT, +- SaHpiBoolT *) __attribute__((used)); ++ SaHpiBoolT *) __asm__("NewSimulatorGetFumiRollback") __attribute__((used)); + + static SaErrorT NewSimulatorGetFumiRollback(void *hnd, + SaHpiResourceIdT id, +@@ -2870,7 +2870,7 @@ static SaErrorT NewSimulatorGetFumiRollb + static SaErrorT NewSimulatorSetFumiRollback(void *, + SaHpiResourceIdT, + SaHpiFumiNumT, +- SaHpiBoolT) __attribute__((used)); ++ SaHpiBoolT) __asm__("NewSimulatorSetFumiRollback") __attribute__((used)); + + static SaErrorT NewSimulatorSetFumiRollback(void *hnd, + SaHpiResourceIdT id, +@@ -2900,7 +2900,7 @@ static SaErrorT NewSimulatorSetFumiRollb + **/ + static SaErrorT NewSimulatorStartFumiRollback(void *, + SaHpiResourceIdT, +- SaHpiFumiNumT) __attribute__((used)); ++ SaHpiFumiNumT) __asm__("NewSimulatorStartFumiRollback") __attribute__((used)); + + static SaErrorT NewSimulatorStartFumiRollback(void *hnd, + SaHpiResourceIdT id, +@@ -2929,7 +2929,7 @@ static SaErrorT NewSimulatorStartFumiRol + **/ + static SaErrorT NewSimulatorActivateFumi(void *, + SaHpiResourceIdT, +- SaHpiFumiNumT) __attribute__((used)); ++ SaHpiFumiNumT) __asm__("NewSimulatorActivateFumi") __attribute__((used)); + + static SaErrorT NewSimulatorActivateFumi(void *hnd, + SaHpiResourceIdT id, +@@ -2960,7 +2960,7 @@ static SaErrorT NewSimulatorActivateFumi + static SaErrorT NewSimulatorStartFumiActivation(void *, + SaHpiResourceIdT, + SaHpiFumiNumT, +- SaHpiBoolT) __attribute__((used)); ++ SaHpiBoolT) __asm__("NewSimulatorStartFumiActivation") __attribute__((used)); + + static SaErrorT NewSimulatorStartFumiActivation(void *hnd, + SaHpiResourceIdT id, +@@ -2992,7 +2992,7 @@ static SaErrorT NewSimulatorStartFumiAct + static SaErrorT NewSimulatorCleanupFumi(void *, + SaHpiResourceIdT, + SaHpiFumiNumT, +- SaHpiBankNumT) __attribute__((used)); ++ SaHpiBankNumT) __asm__("NewSimulatorCleanupFumi") __attribute__((used)); + + static SaErrorT NewSimulatorCleanupFumi(void *hnd, + SaHpiResourceIdT id, +@@ -3023,7 +3023,7 @@ static SaErrorT NewSimulatorCleanupFumi( + static SaErrorT NewSimulatorGetDimiInfo( void *, + SaHpiResourceIdT, + SaHpiDimiNumT, +- SaHpiDimiInfoT *) __attribute__((used)); ++ SaHpiDimiInfoT *) __asm__("NewSimulatorGetDimiInfo") __attribute__((used)); + + static SaErrorT NewSimulatorGetDimiInfo( void *hnd, + SaHpiResourceIdT id, +@@ -3057,7 +3057,7 @@ static SaErrorT NewSimulatorGetDimiTestI + SaHpiResourceIdT, + SaHpiDimiNumT, + SaHpiDimiTestNumT, +- SaHpiDimiTestT *) __attribute__((used)); ++ SaHpiDimiTestT *) __asm__("NewSimulatorGetDimiTestInfo") __attribute__((used)); + + static SaErrorT NewSimulatorGetDimiTestInfo( void *hnd, + SaHpiResourceIdT id, +@@ -3092,7 +3092,7 @@ static SaErrorT NewSimulatorGetDimiTestR + SaHpiResourceIdT, + SaHpiDimiNumT, + SaHpiDimiTestNumT, +- SaHpiDimiReadyT *) __attribute__((used)); ++ SaHpiDimiReadyT *) __asm__("NewSimulatorGetDimiTestReadiness") __attribute__((used)); + + static SaErrorT NewSimulatorGetDimiTestReadiness( void *hnd, + SaHpiResourceIdT id, +@@ -3129,7 +3129,7 @@ static SaErrorT NewSimulatorStartDimiTes + SaHpiDimiNumT, + SaHpiDimiTestNumT, + SaHpiUint8T, +- SaHpiDimiTestVariableParamsT *) __attribute__((used)); ++ SaHpiDimiTestVariableParamsT *) __asm__("NewSimulatorStartDimiTest") __attribute__((used)); + + static SaErrorT NewSimulatorStartDimiTest( void *hnd, + SaHpiResourceIdT id, +@@ -3163,7 +3163,7 @@ static SaErrorT NewSimulatorStartDimiTes + static SaErrorT NewSimulatorCancelDimiTest( void *, + SaHpiResourceIdT, + SaHpiDimiNumT, +- SaHpiDimiTestNumT) __attribute__((used)); ++ SaHpiDimiTestNumT) __asm__("NewSimulatorCancelDimiTest") __attribute__((used)); + + static SaErrorT NewSimulatorCancelDimiTest( void *hnd, + SaHpiResourceIdT id, +@@ -3199,7 +3199,7 @@ static SaErrorT NewSimulatorGetDimiTestS + SaHpiDimiNumT, + SaHpiDimiTestNumT, + SaHpiDimiTestPercentCompletedT *, +- SaHpiDimiTestRunStatusT *) __attribute__((used)); ++ SaHpiDimiTestRunStatusT *) __asm__("NewSimulatorGetDimiTestStatus") __attribute__((used)); + + static SaErrorT NewSimulatorGetDimiTestStatus( void *hnd, + SaHpiResourceIdT id, +@@ -3234,7 +3234,7 @@ static SaErrorT NewSimulatorGetDimiTestR + SaHpiResourceIdT, + SaHpiDimiNumT, + SaHpiDimiTestNumT, +- SaHpiDimiTestResultsT *) __attribute__((used)); ++ SaHpiDimiTestResultsT *) __asm__("NewSimulatorGetDimiTestResults") __attribute__((used)); + + static SaErrorT NewSimulatorGetDimiTestResults( void *hnd, + SaHpiResourceIdT id, +@@ -3263,7 +3263,7 @@ static SaErrorT NewSimulatorGetDimiTestR + * @return HPI error code + **/ + static SaErrorT NewSimulatorSetAutoInsertTimeout( void *, +- SaHpiTimeoutT ) __attribute__((used)); ++ SaHpiTimeoutT ) __asm__("NewSimulatorSetAutoInsertTimeout") __attribute__((used)); + + static SaErrorT NewSimulatorSetAutoInsertTimeout( void *hnd, SaHpiTimeoutT timeout) { + NewSimulator *newsim = VerifyNewSimulator( hnd ); +@@ -3289,7 +3289,7 @@ static SaErrorT NewSimulatorSetAutoInser + * @return HPI error code + **/ + static SaErrorT NewSimulatorGetAutoExtractTimeout( void *, SaHpiResourceIdT, +- SaHpiTimeoutT * ) __attribute__((used)); ++ SaHpiTimeoutT * ) __asm__("NewSimulatorGetAutoExtractTimeout") __attribute__((used)); + + static SaErrorT NewSimulatorGetAutoExtractTimeout( void *hnd, SaHpiResourceIdT id, + SaHpiTimeoutT *timeout ) { +@@ -3319,7 +3319,7 @@ static SaErrorT NewSimulatorGetAutoExtra + * @return HPI error code + **/ + static SaErrorT NewSimulatorSetAutoExtractTimeout( void *, SaHpiResourceIdT, +- SaHpiTimeoutT ) __attribute__((used)); ++ SaHpiTimeoutT ) __asm__("NewSimulatorSetAutoExtractTimeout") __attribute__((used)); + + static SaErrorT NewSimulatorSetAutoExtractTimeout( void *hnd, SaHpiResourceIdT id, + SaHpiTimeoutT timeout ) { +@@ -3350,7 +3350,7 @@ static SaErrorT NewSimulatorSetAutoExtra + * @return HPI error code + **/ + static SaErrorT NewSimulatorGetPowerState( void *, SaHpiResourceIdT, +- SaHpiPowerStateT * ) __attribute__((used)); ++ SaHpiPowerStateT * ) __asm__("NewSimulatorGetPowerState") __attribute__((used)); + + static SaErrorT NewSimulatorGetPowerState( void *hnd, SaHpiResourceIdT id, + SaHpiPowerStateT *state ) { +@@ -3382,7 +3382,7 @@ static SaErrorT NewSimulatorGetPowerStat + * @return HPI error code + **/ + static SaErrorT NewSimulatorSetPowerState( void *, SaHpiResourceIdT, +- SaHpiPowerStateT ) __attribute__((used)); ++ SaHpiPowerStateT ) __asm__("NewSimulatorSetPowerState") __attribute__((used)); + + static SaErrorT NewSimulatorSetPowerState( void *hnd, SaHpiResourceIdT id, + SaHpiPowerStateT state ) { +@@ -3414,7 +3414,7 @@ static SaErrorT NewSimulatorSetPowerStat + * @return HPI error code + **/ + static SaErrorT NewSimulatorGetIndicatorState( void *, SaHpiResourceIdT, +- SaHpiHsIndicatorStateT * ) __attribute__((used)); ++ SaHpiHsIndicatorStateT * ) __asm__("NewSimulatorGetIndicatorState") __attribute__((used)); + + static SaErrorT NewSimulatorGetIndicatorState( void *hnd, SaHpiResourceIdT id, + SaHpiHsIndicatorStateT *state ) { +@@ -3446,7 +3446,7 @@ static SaErrorT NewSimulatorGetIndicator + * @return HPI error code + **/ + static SaErrorT NewSimulatorSetIndicatorState( void *, SaHpiResourceIdT, +- SaHpiHsIndicatorStateT ) __attribute__((used)); ++ SaHpiHsIndicatorStateT ) __asm__("NewSimulatorSetIndicatorState") __attribute__((used)); + + static SaErrorT NewSimulatorSetIndicatorState( void *hnd, SaHpiResourceIdT id, + SaHpiHsIndicatorStateT state ) { +@@ -3479,7 +3479,7 @@ static SaErrorT NewSimulatorSetIndicator + **/ + static SaErrorT NewSimulatorControlParm( void *, + SaHpiResourceIdT, +- SaHpiParmActionT ) __attribute__((used)); ++ SaHpiParmActionT ) __asm__("NewSimulatorControlParm") __attribute__((used)); + + static SaErrorT NewSimulatorControlParm( void *hnd, + SaHpiResourceIdT id, +@@ -3512,7 +3512,7 @@ static SaErrorT NewSimulatorControlParm( + * @return HPI error code + **/ + static SaErrorT NewSimulatorGetResetState( void *, SaHpiResourceIdT, +- SaHpiResetActionT * ) __attribute__((used)); ++ SaHpiResetActionT * ) __asm__("NewSimulatorGetResetState") __attribute__((used)); + + static SaErrorT NewSimulatorGetResetState( void *hnd, SaHpiResourceIdT id, + SaHpiResetActionT *act ) { +@@ -3545,7 +3545,7 @@ static SaErrorT NewSimulatorGetResetStat + **/ + static SaErrorT NewSimulatorSetResetState( void *, + SaHpiResourceIdT, +- SaHpiResetActionT ) __attribute__((used)); ++ SaHpiResetActionT ) __asm__("NewSimulatorSetResetState") __attribute__((used)); + + static SaErrorT NewSimulatorSetResetState( void *hnd, + SaHpiResourceIdT id, +Index: openhpi-3.6.1/plugins/dynamic_simulator/new_sim_file.cpp +=================================================================== +--- openhpi-3.6.1.orig/plugins/dynamic_simulator/new_sim_file.cpp ++++ openhpi-3.6.1/plugins/dynamic_simulator/new_sim_file.cpp +@@ -44,9 +44,9 @@ + ///< Global skip characters for oh_scanner_config + static gchar skip_characters[] = " \t\n"; + ///< Global identifier_first for oh_scanner_config +-static gchar identifier_first[] = G_CSET_a_2_z"_/."G_CSET_A_2_Z; ++static gchar identifier_first[] = G_CSET_a_2_z "_/." G_CSET_A_2_Z; + ///< Global identifier_nth for oh_scanner_config +-static gchar identifier_nth[] = G_CSET_a_2_z"_-0123456789/."G_CSET_A_2_Z; ++static gchar identifier_nth[] = G_CSET_a_2_z "_-0123456789/." G_CSET_A_2_Z; + ///< Global comment signs for oh_scanner_config + static gchar comment_single[] = "#\n"; + +Index: openhpi-3.6.1/plugins/ipmidirect/ipmi.cpp +=================================================================== +--- openhpi-3.6.1.orig/plugins/ipmidirect/ipmi.cpp ++++ openhpi-3.6.1/plugins/ipmidirect/ipmi.cpp +@@ -279,7 +279,7 @@ extern "C" { + // ABI Interface functions + + static void * +-IpmiOpen( GHashTable *, unsigned int, oh_evt_queue * ) __attribute__((used)); ++IpmiOpen( GHashTable *, unsigned int, oh_evt_queue * ) __asm__("IpmiOpen") __attribute__((used)); + + static void * + IpmiOpen( GHashTable *handler_config, unsigned int hid, oh_evt_queue *eventq ) +@@ -388,7 +388,7 @@ IpmiOpen( GHashTable *handler_config, un + + + static void +-IpmiClose( void * ) __attribute__((used)); ++IpmiClose( void * ) __asm__("IpmiClose") __attribute__((used)); + + static void + IpmiClose( void *hnd ) +@@ -436,7 +436,7 @@ IpmiClose( void *hnd ) + + + static SaErrorT +-IpmiGetEvent( void * ) __attribute__((used)); ++IpmiGetEvent( void * ) __asm__("IpmiGetEvent") __attribute__((used)); + + static SaErrorT + IpmiGetEvent( void *hnd ) +@@ -458,7 +458,7 @@ IpmiGetEvent( void *hnd ) + + + static SaErrorT +-IpmiDiscoverResources( void * ) __attribute__((used)); ++IpmiDiscoverResources( void * ) __asm__("IpmiDiscoverResources") __attribute__((used)); + + static SaErrorT + IpmiDiscoverResources( void *hnd ) +@@ -479,7 +479,7 @@ IpmiDiscoverResources( void *hnd ) + + + static SaErrorT +-IpmiSetResourceTag( void *, SaHpiResourceIdT, SaHpiTextBufferT * ) __attribute__((used)); ++IpmiSetResourceTag( void *, SaHpiResourceIdT, SaHpiTextBufferT * ) __asm__("IpmiSetResourceTag") __attribute__((used)); + + static SaErrorT + IpmiSetResourceTag( void *hnd, SaHpiResourceIdT id, SaHpiTextBufferT *tag ) +@@ -499,7 +499,7 @@ IpmiSetResourceTag( void *hnd, SaHpiReso + + + static SaErrorT +-IpmiSetResourceSeverity( void *, SaHpiResourceIdT, SaHpiSeverityT ) __attribute__((used)); ++IpmiSetResourceSeverity( void *, SaHpiResourceIdT, SaHpiSeverityT ) __asm__("IpmiSetResourceSeverity") __attribute__((used)); + + static SaErrorT + IpmiSetResourceSeverity( void *hnd, SaHpiResourceIdT id, SaHpiSeverityT sev ) +@@ -523,7 +523,7 @@ IpmiGetSensorReading( void *, + SaHpiResourceIdT id, + SaHpiSensorNumT num, + SaHpiSensorReadingT *data, +- SaHpiEventStateT *state ) __attribute__((used)); ++ SaHpiEventStateT *state ) __asm__("IpmiGetSensorReading") __attribute__((used)); + + static SaErrorT + IpmiGetSensorReading( void *hnd, +@@ -550,7 +550,7 @@ static SaErrorT + IpmiGetSensorThresholds( void *hnd, + SaHpiResourceIdT, + SaHpiSensorNumT, +- SaHpiSensorThresholdsT * ) __attribute__((used)); ++ SaHpiSensorThresholdsT * ) __asm__("IpmiGetSensorThresholds") __attribute__((used)); + + static SaErrorT + IpmiGetSensorThresholds( void *hnd, +@@ -581,7 +581,7 @@ static SaErrorT + IpmiSetSensorThresholds( void *, + SaHpiResourceIdT, + SaHpiSensorNumT, +- const SaHpiSensorThresholdsT * ) __attribute__((used)); ++ const SaHpiSensorThresholdsT * ) __asm__("IpmiSetSensorThresholds") __attribute__((used)); + + static SaErrorT + IpmiSetSensorThresholds( void *hnd, +@@ -612,7 +612,7 @@ static SaErrorT + IpmiGetSensorEnable( void *, + SaHpiResourceIdT, + SaHpiSensorNumT, +- SaHpiBoolT * ) __attribute__((used)); ++ SaHpiBoolT * ) __asm__("IpmiGetSensorEnable") __attribute__((used)); + + static SaErrorT + IpmiGetSensorEnable( void *hnd, +@@ -638,7 +638,7 @@ static SaErrorT + IpmiSetSensorEnable( void *, + SaHpiResourceIdT, + SaHpiSensorNumT, +- SaHpiBoolT ) __attribute__((used)); ++ SaHpiBoolT ) __asm__("IpmiSetSensorEnable") __attribute__((used)); + + static SaErrorT + IpmiSetSensorEnable( void *hnd, +@@ -664,7 +664,7 @@ static SaErrorT + IpmiGetSensorEventEnables( void *, + SaHpiResourceIdT, + SaHpiSensorNumT, +- SaHpiBoolT * ) __attribute__((used)); ++ SaHpiBoolT * ) __asm__("IpmiGetSensorEventEnables") __attribute__((used)); + + static SaErrorT + IpmiGetSensorEventEnables( void *hnd, +@@ -690,7 +690,7 @@ static SaErrorT + IpmiSetSensorEventEnables( void *, + SaHpiResourceIdT, + SaHpiSensorNumT, +- SaHpiBoolT ) __attribute__((used)); ++ SaHpiBoolT ) __asm__("IpmiSetSensorEventEnables") __attribute__((used)); + + static SaErrorT + IpmiSetSensorEventEnables( void *hnd, +@@ -717,7 +717,7 @@ IpmiGetSensorEventMasks( void *, + SaHpiResourceIdT, + SaHpiSensorNumT, + SaHpiEventStateT *, +- SaHpiEventStateT * ) __attribute__((used)); ++ SaHpiEventStateT * ) __asm__("IpmiGetSensorEventMasks") __attribute__((used)); + + static SaErrorT + IpmiGetSensorEventMasks( void *hnd, +@@ -747,7 +747,7 @@ IpmiSetSensorEventMasks( void *, + SaHpiSensorNumT, + SaHpiSensorEventMaskActionT, + SaHpiEventStateT, +- SaHpiEventStateT ) __attribute__((used)); ++ SaHpiEventStateT ) __asm__("IpmiSetSensorEventMasks") __attribute__((used)); + + static SaErrorT + IpmiSetSensorEventMasks( void *hnd, +@@ -776,7 +776,7 @@ static SaErrorT + IpmiGetControlState( void *, SaHpiResourceIdT, + SaHpiCtrlNumT, + SaHpiCtrlModeT *, +- SaHpiCtrlStateT * ) __attribute__((used)); ++ SaHpiCtrlStateT * ) __asm__("IpmiGetControlState") __attribute__((used)); + + static SaErrorT + IpmiGetControlState( void *hnd, SaHpiResourceIdT id, +@@ -802,7 +802,7 @@ static SaErrorT + IpmiSetControlState( void *, SaHpiResourceIdT, + SaHpiCtrlNumT, + SaHpiCtrlModeT, +- SaHpiCtrlStateT * ) __attribute__((used)); ++ SaHpiCtrlStateT * ) __asm__("IpmiSetControlState") __attribute__((used)); + + static SaErrorT + IpmiSetControlState( void *hnd, SaHpiResourceIdT id, +@@ -828,7 +828,7 @@ static SaErrorT + IpmiGetIdrInfo( void *, + SaHpiResourceIdT, + SaHpiIdrIdT, +- SaHpiIdrInfoT * ) __attribute__((used)); ++ SaHpiIdrInfoT * ) __asm__("IpmiGetIdrInfo") __attribute__((used)); + + static SaErrorT + IpmiGetIdrInfo( void *hnd, +@@ -857,7 +857,7 @@ IpmiGetIdrAreaHeader( void *, + SaHpiIdrAreaTypeT, + SaHpiEntryIdT, + SaHpiEntryIdT *, +- SaHpiIdrAreaHeaderT * ) __attribute__((used)); ++ SaHpiIdrAreaHeaderT * ) __asm__("IpmiGetIdrAreaHeader") __attribute__((used)); + + static SaErrorT + IpmiGetIdrAreaHeader( void *hnd, +@@ -887,7 +887,7 @@ IpmiAddIdrArea( void *, + SaHpiResourceIdT, + SaHpiIdrIdT, + SaHpiIdrAreaTypeT, +- SaHpiEntryIdT * ) __attribute__((used)); ++ SaHpiEntryIdT * ) __asm__("IpmiAddIdrArea") __attribute__((used)); + + static SaErrorT + IpmiAddIdrArea( void *hnd, +@@ -914,7 +914,7 @@ static SaErrorT + IpmiDelIdrArea( void *, + SaHpiResourceIdT, + SaHpiIdrIdT, +- SaHpiEntryIdT ) __attribute__((used)); ++ SaHpiEntryIdT ) __asm__("IpmiDelIdrArea") __attribute__((used)); + + static SaErrorT + IpmiDelIdrArea( void *hnd, +@@ -944,7 +944,7 @@ IpmiGetIdrField( void *, + SaHpiIdrFieldTypeT, + SaHpiEntryIdT, + SaHpiEntryIdT *, +- SaHpiIdrFieldT * ) __attribute__((used)); ++ SaHpiIdrFieldT * ) __asm__("IpmiGetIdrField") __attribute__((used)); + + static SaErrorT + IpmiGetIdrField( void *hnd, +@@ -974,7 +974,7 @@ static SaErrorT + IpmiAddIdrField( void *, + SaHpiResourceIdT, + SaHpiIdrIdT, +- SaHpiIdrFieldT * ) __attribute__((used)); ++ SaHpiIdrFieldT * ) __asm__("IpmiAddIdrField") __attribute__((used)); + + static SaErrorT + IpmiAddIdrField( void *hnd, +@@ -1000,7 +1000,7 @@ static SaErrorT + IpmiSetIdrField( void *, + SaHpiResourceIdT, + SaHpiIdrIdT, +- SaHpiIdrFieldT * ) __attribute__((used)); ++ SaHpiIdrFieldT * ) __asm__("IpmiSetIdrField") __attribute__((used)); + + static SaErrorT + IpmiSetIdrField( void *hnd, +@@ -1027,7 +1027,7 @@ IpmiDelIdrField( void *, + SaHpiResourceIdT, + SaHpiIdrIdT, + SaHpiEntryIdT, +- SaHpiEntryIdT ) __attribute__((used)); ++ SaHpiEntryIdT ) __asm__("IpmiDelIdrField") __attribute__((used)); + + static SaErrorT + IpmiDelIdrField( void *hnd, +@@ -1053,7 +1053,7 @@ IpmiDelIdrField( void *hnd, + static SaErrorT + IpmiGetSelInfo( void *, + SaHpiResourceIdT, +- SaHpiEventLogInfoT * ) __attribute__((used)); ++ SaHpiEventLogInfoT * ) __asm__("IpmiGetSelInfo") __attribute__((used)); + + static SaErrorT + IpmiGetSelInfo( void *hnd, +@@ -1075,7 +1075,7 @@ IpmiGetSelInfo( void *hnd, + + + static SaErrorT +-IpmiSetSelTime( void *, SaHpiResourceIdT, SaHpiTimeT ) __attribute__((used)); ++IpmiSetSelTime( void *, SaHpiResourceIdT, SaHpiTimeT ) __asm__("IpmiSetSelTime") __attribute__((used)); + + static SaErrorT + IpmiSetSelTime( void *hnd, SaHpiResourceIdT id, SaHpiTimeT t ) +@@ -1096,7 +1096,7 @@ IpmiSetSelTime( void *hnd, SaHpiResource + + static SaErrorT + IpmiAddSelEntry( void *, SaHpiResourceIdT, +- const SaHpiEventT * ) __attribute__((used)); ++ const SaHpiEventT * ) __asm__("IpmiAddSelEntry") __attribute__((used)); + + static SaErrorT + IpmiAddSelEntry( void *hnd, SaHpiResourceIdT id, +@@ -1118,7 +1118,7 @@ IpmiAddSelEntry( void *hnd, SaHpiResourc + #ifdef NOTUSED + static SaErrorT + IpmiDelSelEntry( void *, SaHpiResourceIdT, +- SaHpiEventLogEntryIdT ) __attribute__((used)); ++ SaHpiEventLogEntryIdT ) __asm__("IpmiDelSelEntry") __attribute__((used)); + + static SaErrorT + IpmiDelSelEntry( void *hnd, SaHpiResourceIdT id, +@@ -1145,7 +1145,7 @@ IpmiGetSelEntry( void *hnd, SaHpiResourc + SaHpiEventLogEntryIdT *, SaHpiEventLogEntryIdT *, + SaHpiEventLogEntryT *, + SaHpiRdrT *, +- SaHpiRptEntryT * ) __attribute__((used)); ++ SaHpiRptEntryT * ) __asm__("IpmiGetSelEntry") __attribute__((used)); + + static SaErrorT + IpmiGetSelEntry( void *hnd, SaHpiResourceIdT id, +@@ -1170,7 +1170,7 @@ IpmiGetSelEntry( void *hnd, SaHpiResourc + + + static SaErrorT +-IpmiClearSel( void *, SaHpiResourceIdT ) __attribute__((used)); ++IpmiClearSel( void *, SaHpiResourceIdT ) __asm__("IpmiClearSel") __attribute__((used)); + + static SaErrorT + IpmiClearSel( void *hnd, SaHpiResourceIdT id ) +@@ -1190,7 +1190,7 @@ IpmiClearSel( void *hnd, SaHpiResourceId + + static SaErrorT + IpmiHotswapPolicyCancel( void *, SaHpiResourceIdT, +- SaHpiTimeoutT ) __attribute__((used)); ++ SaHpiTimeoutT ) __asm__("IpmiHotswapPolicyCancel") __attribute__((used)); + + static SaErrorT + IpmiHotswapPolicyCancel( void *hnd, SaHpiResourceIdT id, +@@ -1210,7 +1210,7 @@ IpmiHotswapPolicyCancel( void *hnd, SaHp + } + + static SaErrorT +-IpmiSetAutoInsertTimeout( void *, SaHpiTimeoutT ) __attribute__((used)); ++IpmiSetAutoInsertTimeout( void *, SaHpiTimeoutT ) __asm__("IpmiSetAutoInsertTimeout") __attribute__((used)); + + static SaErrorT + IpmiSetAutoInsertTimeout( void *hnd, SaHpiTimeoutT timeout) +@@ -1229,7 +1229,7 @@ IpmiSetAutoInsertTimeout( void *hnd, SaH + + static SaErrorT + IpmiGetAutoExtractTimeout( void *, SaHpiResourceIdT, +- SaHpiTimeoutT * ) __attribute__((used)); ++ SaHpiTimeoutT * ) __asm__("IpmiGetAutoExtractTimeout") __attribute__((used)); + + static SaErrorT + IpmiGetAutoExtractTimeout( void *hnd, SaHpiResourceIdT id, +@@ -1250,7 +1250,7 @@ IpmiGetAutoExtractTimeout( void *hnd, Sa + + static SaErrorT + IpmiSetAutoExtractTimeout( void *, SaHpiResourceIdT, +- SaHpiTimeoutT ) __attribute__((used)); ++ SaHpiTimeoutT ) __asm__("IpmiSetAutoExtractTimeout") __attribute__((used)); + + static SaErrorT + IpmiSetAutoExtractTimeout( void *hnd, SaHpiResourceIdT id, +@@ -1271,7 +1271,7 @@ IpmiSetAutoExtractTimeout( void *hnd, Sa + + static SaErrorT + IpmiGetHotswapState( void *, SaHpiResourceIdT , +- SaHpiHsStateT * ) __attribute__((used)); ++ SaHpiHsStateT * ) __asm__("IpmiGetHotswapState") __attribute__((used)); + + static SaErrorT + IpmiGetHotswapState( void *hnd, SaHpiResourceIdT id, +@@ -1293,7 +1293,7 @@ IpmiGetHotswapState( void *hnd, SaHpiRes + + static SaErrorT + IpmiSetHotswapState( void *, SaHpiResourceIdT, +- SaHpiHsStateT ) __attribute__((used)); ++ SaHpiHsStateT ) __asm__("IpmiSetHotswapState") __attribute__((used)); + + static SaErrorT + IpmiSetHotswapState( void *hnd, SaHpiResourceIdT id, +@@ -1315,7 +1315,7 @@ IpmiSetHotswapState( void *hnd, SaHpiRes + + static SaErrorT + IpmiRequestHotswapAction( void *, SaHpiResourceIdT, +- SaHpiHsActionT ) __attribute__((used)); ++ SaHpiHsActionT ) __asm__("IpmiRequestHotswapAction") __attribute__((used)); + + static SaErrorT + IpmiRequestHotswapAction( void *hnd, SaHpiResourceIdT id, +@@ -1337,7 +1337,7 @@ IpmiRequestHotswapAction( void *hnd, SaH + + static SaErrorT + IpmiGetPowerState( void *, SaHpiResourceIdT, +- SaHpiPowerStateT * ) __attribute__((used)); ++ SaHpiPowerStateT * ) __asm__("IpmiGetPowerState") __attribute__((used)); + + static SaErrorT + IpmiGetPowerState( void *hnd, SaHpiResourceIdT id, +@@ -1359,7 +1359,7 @@ IpmiGetPowerState( void *hnd, SaHpiResou + + static SaErrorT + IpmiSetPowerState( void *, SaHpiResourceIdT, +- SaHpiPowerStateT ) __attribute__((used)); ++ SaHpiPowerStateT ) __asm__("IpmiSetPowerState") __attribute__((used)); + + static SaErrorT + IpmiSetPowerState( void *hnd, SaHpiResourceIdT id, +@@ -1381,7 +1381,7 @@ IpmiSetPowerState( void *hnd, SaHpiResou + + static SaErrorT + IpmiGetIndicatorState( void *, SaHpiResourceIdT, +- SaHpiHsIndicatorStateT * ) __attribute__((used)); ++ SaHpiHsIndicatorStateT * ) __asm__("IpmiGetIndicatorState") __attribute__((used)); + + static SaErrorT + IpmiGetIndicatorState( void *hnd, SaHpiResourceIdT id, +@@ -1403,7 +1403,7 @@ IpmiGetIndicatorState( void *hnd, SaHpiR + + static SaErrorT + IpmiSetIndicatorState( void *, SaHpiResourceIdT, +- SaHpiHsIndicatorStateT ) __attribute__((used)); ++ SaHpiHsIndicatorStateT ) __asm__("IpmiSetIndicatorState") __attribute__((used)); + + static SaErrorT + IpmiSetIndicatorState( void *hnd, SaHpiResourceIdT id, +@@ -1426,7 +1426,7 @@ IpmiSetIndicatorState( void *hnd, SaHpiR + static SaErrorT + IpmiControlParm( void *, + SaHpiResourceIdT, +- SaHpiParmActionT ) __attribute__((used)); ++ SaHpiParmActionT ) __asm__("IpmiControlParm") __attribute__((used)); + + static SaErrorT + IpmiControlParm( void *hnd, +@@ -1449,7 +1449,7 @@ IpmiControlParm( void *hnd, + + static SaErrorT + IpmiGetResetState( void *, SaHpiResourceIdT, +- SaHpiResetActionT * ) __attribute__((used)); ++ SaHpiResetActionT * ) __asm__("IpmiGetResetState") __attribute__((used)); + + static SaErrorT + IpmiGetResetState( void *hnd, SaHpiResourceIdT id, +@@ -1472,7 +1472,7 @@ IpmiGetResetState( void *hnd, SaHpiResou + static SaErrorT + IpmiSetResetState( void *, + SaHpiResourceIdT, +- SaHpiResetActionT ) __attribute__((used)); ++ SaHpiResetActionT ) __asm__("IpmiSetResetState") __attribute__((used)); + + static SaErrorT + IpmiSetResetState( void *hnd, +@@ -1496,7 +1496,7 @@ static SaErrorT + IpmiGetWatchdogInfo(void *, + SaHpiResourceIdT, + SaHpiWatchdogNumT, +- SaHpiWatchdogT *) __attribute__((used)); ++ SaHpiWatchdogT *) __asm__("IpmiGetWatchdogInfo") __attribute__((used)); + + static SaErrorT + IpmiGetWatchdogInfo(void *hnd, +@@ -1517,7 +1517,7 @@ static SaErrorT + IpmiSetWatchdogInfo(void *, + SaHpiResourceIdT, + SaHpiWatchdogNumT, +- SaHpiWatchdogT *) __attribute__((used)); ++ SaHpiWatchdogT *) __asm__("IpmiSetWatchdogInfo") __attribute__((used)); + + static SaErrorT + IpmiSetWatchdogInfo(void *hnd, +@@ -1537,7 +1537,7 @@ IpmiSetWatchdogInfo(void *hnd, + static SaErrorT + IpmiResetWatchdog(void *, + SaHpiResourceIdT, +- SaHpiWatchdogNumT) __attribute__((used)); ++ SaHpiWatchdogNumT) __asm__("IpmiResetWatchdog") __attribute__((used)); + + static SaErrorT + IpmiResetWatchdog(void *hnd, +Index: openhpi-3.6.1/plugins/ipmidirect/ipmi_auth.h +=================================================================== +--- openhpi-3.6.1.orig/plugins/ipmidirect/ipmi_auth.h ++++ openhpi-3.6.1/plugins/ipmidirect/ipmi_auth.h +@@ -32,7 +32,7 @@ class cIpmiAuthSg + { + public: + void *data; /* NULL to terminate. */ +- int len; ++ unsigned int len; + }; + + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch new file mode 100644 index 000000000..4c545708f --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/fix-narrowing-warning.patch @@ -0,0 +1,20 @@ +Fix + +sensor_factors_000.cpp:66:5: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned char' in initializer list [-Wc++11-narrowing] +((dRExp << 4) & 0xf0) | (dBExp & 0x0f ), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Index: openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp +=================================================================== +--- openhpi-3.6.1.orig/plugins/ipmidirect/t/sensor_factors_000.cpp ++++ openhpi-3.6.1/plugins/ipmidirect/t/sensor_factors_000.cpp +@@ -63,7 +63,7 @@ static cIpmiSdr sdr = + dB & 0xff, + ((dB >> 2) & 0xc0) | (dAccuracy & 0x3f), + ((dAccuracy >> 2) & 0xf0) | ((dAccuracyExp << 2) & 0x0c), +- ((dRExp << 4) & 0xf0) | (dBExp & 0x0f ), ++ (unsigned char)(((dRExp << 4) & 0xf0) | (dBExp & 0x0f )), + 0, + 0, + } diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch new file mode 100644 index 000000000..4644910b7 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-add-libnetsnmp-when-link.patch @@ -0,0 +1,25 @@ +[PATCH] add libnetsnmp when link + +Upstream-Status: Pending + +Signed-off-by: Roy Li <rongqing.li@windriver.com> +--- + plugins/snmp_bc/t/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/snmp_bc/t/Makefile.am b/plugins/snmp_bc/t/Makefile.am +index 57e77ac..9894620 100644 +--- a/plugins/snmp_bc/t/Makefile.am ++++ b/plugins/snmp_bc/t/Makefile.am +@@ -74,7 +74,7 @@ nodist_libsnmp_bc_la_SOURCES = $(GENERATED_EVENT_CODE) $(REMOTE_SIM_SOURCES) + # libopenhpi_la_LIBADD = $(top_builddir)/utils/libopenhpiutils.la + # libopenhpi_la_LDFLAGS = -L$(top_builddir)/utils -version-info @HPI_LIB_VERSION@ -export-symbols $(top_srcdir)/src/hpi.sym + +-libsnmp_bc_la_LIBADD = -luuid @SNMPLIBS@ $(top_builddir)/utils/libopenhpiutils.la ++libsnmp_bc_la_LIBADD = -luuid @SNMPLIBS@ $(top_builddir)/utils/libopenhpiutils.la -lnetsnmp + libsnmp_bc_la_LDFLAGS = -L$(top_builddir)/utils -module -version-info @HPI_LIB_VERSION@ + # libsnmp_bc_la_LDFLAGS = -version 0:0:0 + +-- +1.7.10.4 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch new file mode 100644 index 000000000..077e26cbf --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-alignment-issue.patch @@ -0,0 +1,23 @@ +Fix alignment issue in ipmi_inventory.c + +Upstream-Status: Pending + +Signed-of-by: Aws Ismail <aws.ismail@windriver.com> + +diff --git a/plugins/ipmi/ipmi_inventory.c b/plugins/ipmi/ipmi_inventory.c +index 5382186..01655c6 100644 +--- a/plugins/ipmi/ipmi_inventory.c ++++ b/plugins/ipmi/ipmi_inventory.c +@@ -2546,8 +2546,11 @@ static SaErrorT modify_inventory(SaHpiIdrFieldT *field, + if (tb->DataLength == 0) { + rv = ipmi_fru_set_board_info_mfg_time(fru, 0); + } else { ++ time_t the_time; ++ /* tb->Data is not aligned -- copy to temp */ ++ memcpy(&the_time, tb->Data, sizeof(the_time)); + rv = ipmi_fru_set_board_info_mfg_time(fru, +- *(time_t *)tb->Data); ++ the_time); + } + break; + case SAHPI_IDR_FIELDTYPE_MANUFACTURER: diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch new file mode 100644 index 000000000..97c515e00 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-host-gcc.patch @@ -0,0 +1,24 @@ +fix host gcc warnings + +Remove gcc warnings when gcc is v3.2 + +Upstream-Status: Pending + +Signed-of-by: Aws Ismail <aws.ismail@windriver.com> + +Index: openhpi-3.6.1/configure.ac +=================================================================== +--- openhpi-3.6.1.orig/configure.ac ++++ openhpi-3.6.1/configure.ac +@@ -656,11 +656,6 @@ AC_ARG_ENABLE([werror], + fi], + []) + +-if test -n "`gcc --version | grep ' 3.2'`" ; then +- CC_WARNINGS=`echo $CC_WARNINGS | sed -e 's/-Wno-strict-aliasing//g'` +- CXX_WARNINGS=`echo $CC_WARNINGS | sed -e 's/-Wno-strict-aliasing//g'` +-fi +- + case $host_os in + solaris*) + CC_WARNINGS=`echo $CC_WARNINGS | sed -e 's/-Wcast-qual//g'` diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch new file mode 100644 index 000000000..60e2e7919 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-fix-testfail-errors.patch @@ -0,0 +1,33 @@ +Fix for saftest failures. + +Upstream-Status: Pending + +Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com> + +Index: openhpi-3.6.1/openhpid/safhpi.c +=================================================================== +--- openhpi-3.6.1.orig/openhpid/safhpi.c ++++ openhpi-3.6.1/openhpid/safhpi.c +@@ -1933,7 +1933,7 @@ SaErrorT SAHPI_API saHpiSensorThresholds + oh_release_domain(d); /* Unlock domain */ + + OH_CALL_ABI(h, set_sensor_thresholds, SA_ERR_HPI_INVALID_CMD, rv, +- ResourceId, SensorNum, SensorThresholds); ++ ResourceId, SensorNum, &tmp); + oh_release_handler(h); + + return rv; +Index: openhpi-3.6.1/utils/sahpi_struct_utils.c +=================================================================== +--- openhpi-3.6.1.orig/utils/sahpi_struct_utils.c ++++ openhpi-3.6.1/utils/sahpi_struct_utils.c +@@ -3861,6 +3861,9 @@ SaHpiBoolT oh_valid_textbuffer(SaHpiText + /* found a unpaired surrogate */ + return SAHPI_FALSE; + } ++ } else { ++ /*the first 2 bytes wrong*/ ++ return SAHPI_FALSE; + } + } + break; diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch new file mode 100644 index 000000000..1627c9797 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-glib-cross-compile.patch @@ -0,0 +1,33 @@ +Fix glib cross compile + +Uses proper PKG_CONFIG_PATH when cross-compiling + +Upstream-Status: Pending + +Signed-of-by: Aws Ismail <aws.ismail@windriver.com> + +diff --git a/configure.ac b/configure.ac +index b5f5aad..f5a5b74 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -110,13 +110,13 @@ else + *** GLIB is always available from ftp://ftp.gtk.org/.]) + fi + +-exact_version=`pkg-config --modversion $GLIB`; +-GLIB_CFLAGS=`pkg-config --cflags $GLIB $GTHREAD` +-GLIB_LIBS=`pkg-config --libs $GLIB $GTHREAD` +-GLIB_ONLY_CFLAGS=`pkg-config --cflags $GLIB` +-GLIB_ONLY_LIBS=`pkg-config --libs $GLIB` +-GMODULE_ONLY_CFLAGS=`pkg-config --cflags $GMODULE` +-GMODULE_ONLY_LIBS=`pkg-config --libs $GMODULE` ++exact_version=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --modversion $GLIB`; ++GLIB_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --cflags $GLIB $GTHREAD` ++GLIB_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --libs $GLIB $GTHREAD` ++GLIB_ONLY_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --cflags $GLIB` ++GLIB_ONLY_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --libs $GLIB` ++GMODULE_ONLY_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --cflags $GMODULE` ++GMODULE_ONLY_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH pkg-config --libs $GMODULE` + + # On some versions of Solaris the pkg-config file for gthread-2.0 contains a + # compiler option, '-mt', that is incompatible with gcc diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch new file mode 100644 index 000000000..cc21ff8c7 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch @@ -0,0 +1,29 @@ +commit e9f9a73c9dba8dd59f3d6c3acd9988ec8361d55a +Author: Aws Ismail <aws.ismail@windriver.com> +Date: Mon Dec 17 16:23:45 2012 -0500 + + Correct dangling g_thread_exit in session.c + + hpi_shell's session.c has its progress_bar + thread created using pthread_create but + exited using g_thread_exit. Use pthread_exit + instead to avoid unpredictable GLIB thread + errors. + + Upstream-Status: Pending + + Signed-off-by: Aws Ismail <aws.ismail@windriver.com> + +Index: openhpi-3.6.1/hpi_shell/session.c +=================================================================== +--- openhpi-3.6.1.orig/hpi_shell/session.c ++++ openhpi-3.6.1/hpi_shell/session.c +@@ -73,7 +73,7 @@ static void* progress_bar(void *unused) + if (i < (PROGRESS_BUF_SIZE - mes_len - 1)) i++; + t++; + }; +- g_thread_exit(0); ++ pthread_exit(0); + return (void *)1; + } + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch new file mode 100644 index 000000000..d03c97e18 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-invalide-session.patch @@ -0,0 +1,21 @@ +Upstream-Status: Submitted + +Package saftest run a test case to pass invalid session id to function +saHpiResourceIdGet that expect return SA_ERR_HPI_INVALID_SESSION. But the check +for SA_ERR_HPI_INVALID_SESSION is missed somehow in function saHpiResourceIdGet. + +Add check for SA_ERR_HPI_INVALID_SESSION. + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +----- +--- openhpi-3.4.0/baselib/safhpi.cpp.orig 2014-02-25 10:45:20.911734868 +0800 ++++ openhpi-3.4.0/baselib/safhpi.cpp 2014-02-25 10:46:05.366925389 +0800 +@@ -477,6 +477,8 @@ + &rpt_update_count ); + if ( rv == SA_ERR_HPI_NOT_PRESENT ) { + return SA_ERR_HPI_NOT_PRESENT; ++ } else if ( rv == SA_ERR_HPI_INVALID_SESSION) { ++ return SA_ERR_HPI_INVALID_SESSION; + } else if ( rv != SA_OK ) { + return SA_ERR_HPI_UNKNOWN; + } diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch new file mode 100644 index 000000000..c848b3502 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch @@ -0,0 +1,21 @@ +Fix libxml2 for cross-compiling + +Use proper XML2_INCLUDE path when cross-compiling + +Upstream-Status: Pending + +Signed-of-by: Aws Ismail <aws.ismail@windriver.com> + +Index: openhpi-3.6.1/configure.ac +=================================================================== +--- openhpi-3.6.1.orig/configure.ac ++++ openhpi-3.6.1/configure.ac +@@ -177,7 +177,7 @@ AC_CHECK_HEADERS([openssl/md2.h openssl/ + + dnl xml is used for XML-based communication in ilo2_ribcl and oa_soap + AC_CHECK_LIB([xml2],[xmlParseMemory],[XML2_LIB=-lxml2],[XML2_LIB=]) +-AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="-I/usr/include/libxml2"],[XML2_INCLUDE]) ++AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="$XML2_INCLUDE"],[XML2_INCLUDE]) + AC_SUBST(XML2_LIB) + AC_SUBST(XML2_INCLUDE) + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch new file mode 100644 index 000000000..3222f5d13 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-linkfix.patch @@ -0,0 +1,33 @@ +Fix ipmi plugin's test dir compilation + +The ipmi plugin's test dir is not included +in compilation since it does not compile +properly with SSL + +Signed-of-by: Aws Ismail <aws.ismail@windriver.com> + +Upstream-Status: Pending + +Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> +--- + plugins/ipmi/Makefile.in | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/plugins/ipmi/Makefile.in b/plugins/ipmi/Makefile.in +index 7c6b0a4..6204dbe 100644 +--- a/plugins/ipmi/Makefile.in ++++ b/plugins/ipmi/Makefile.in +@@ -448,7 +448,9 @@ top_srcdir = @top_srcdir@ + MAINTAINERCLEANFILES = Makefile.in + AM_CPPFLAGS = -DG_LOG_DOMAIN=\"ipmi\" @OPENHPI_INCLUDES@ + EXTRA_DIST = ipmi.sym ekeyfru.h +-SUBDIRS = t ++#SUBDIRS = t ++#Tests don't compile wih SSL properly so comment them out ++SUBDIRS = + AM_CFLAGS = @OPENIPMI_CFLAGS@ + pkglib_LTLIBRARIES = libipmi.la + libipmi_la_SOURCES = ipmi.c \ +-- +1.9.1 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch new file mode 100644 index 000000000..95b0abc91 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch @@ -0,0 +1,48 @@ +Fix net-snmp when cross-compiling + +Remove irrelevant references to net-snmp libs and flags +when cross-compiling net-snmp + +Signed-of-by: Aws Ismail <aws.ismail@windriver.com> + +Upstream-Status: Pending + +Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> +--- + acinclude.m4 | 4 ++-- + configure | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 82c33f6..727e461 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -160,8 +160,8 @@ AC_DEFUN([OH_CHECK_NETSNMP], + ], + [ + have_netsnmp=yes +- SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/-O\S*//g'` +- SNMPLIBS=`${net_snmp_config:-net-snmp-config} --libs` ++ SNMPFLAGS="" ++ SNMPLIBS="" + AC_MSG_RESULT(yes) + ], + [AC_MSG_RESULT(no. No SNMP based plugins can be built!)]) +diff --git a/configure b/configure +index 00067bc..36b913c 100755 +--- a/configure ++++ b/configure +@@ -15949,8 +15949,8 @@ _ACEOF + if ac_fn_c_try_link "$LINENO"; then : + + have_netsnmp=yes +- SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/-O\S*//g'` +- SNMPLIBS=`${net_snmp_config:-net-snmp-config} --libs` ++ SNMPFLAGS="" ++ SNMPLIBS="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + +-- +1.9.1 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch new file mode 100644 index 000000000..38d9a6742 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-sysfs-cross-compile.patch @@ -0,0 +1,23 @@ +Fix sysfs when cross-compiling + +Use proper paths for sysfs plugins when cross-compiling + +Signed-of-by: Aws Ismail <aws.ismail@windriver.com> + +Upstream-Status: Pending + +Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> + +diff --git a/plugins/sysfs/sysfs2hpi.c b/plugins/sysfs/sysfs2hpi.c +index a745214..3685598 100644 +--- a/plugins/sysfs/sysfs2hpi.c ++++ b/plugins/sysfs/sysfs2hpi.c +@@ -18,7 +18,7 @@ + + #include <stdlib.h> + #include <string.h> +-#include <libsysfs.h> ++#include <sysfs/libsysfs.h> + + #include <SaHpi.h> + #include <oh_utils.h> diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch new file mode 100644 index 000000000..3e09180d4 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch @@ -0,0 +1,28 @@ +From 36fbaa27e7299f63c1324b0ad22b970e9365d6a7 Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Wed, 24 Dec 2014 10:54:59 +0800 +Subject: [PATCH] openhpi: use serial-tests config needed by ptest + +ptest needs buildtest-TESTS and runtest-TESTS targets. +serial-tests is required to generate those targets. + +Upstream-Status: Inappropriate [default automake behavior incompatible with ptest] + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +Index: openhpi-3.6.1/configure.ac +=================================================================== +--- openhpi-3.6.1.orig/configure.ac ++++ openhpi-3.6.1/configure.ac +@@ -7,7 +7,7 @@ dnl various hacks by Sean Dague <http: + AC_PREREQ(2.57) + AC_INIT(openhpi, 3.6.1) + AC_CONFIG_SRCDIR(openhpi.spec.in) +-AM_INIT_AUTOMAKE([1.8]) ++AM_INIT_AUTOMAKE([1.8 serial-tests]) + + AM_CONFIG_HEADER(config.h) + AH_TOP([#ifndef __OPENHPI_CONFIG_H diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi.init b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi.init new file mode 100755 index 000000000..3a5f4a06a --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi.init @@ -0,0 +1,230 @@ +#! /bin/sh +# +### BEGIN INIT INFO +# Provides: openhpid +# Required-Start: $network $remote_fs $syslog +# Required-Stop: $network $remote_fs $syslog +# Should-Start: $named +# Should-Stop: $named +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start OpenHPI daemon at boot time +# Description: Enable OpenHPI service which is provided by openhpid. +### END INIT INFO +# +# openhpid.sh Start/Stop the openhpi daemon. +# +# description: openhpid is standard UNIX program which uses the OpenHPI \ +# APIs and provides a standard internet server to access those \ +# APIs for client programs. +# processname: openhpid +# config: the standard openhpi conf file specified on the command line or the env. +# pidfile: /var/run/openhpid.pid +# +# Author(s): +# W. David Ashley <dashley@us.ibm.com> +# Daniel de Araujo <ddearauj@us.ibm.com> + +# Source function library. +PATH=/sbin:/bin:/usr/sbin:/usr/bin +prog="OpenHPI" + +# If the openhpid executable is not available, we can't do any of this +test -f /usr/sbin/openhpid || exit 0 + +# Determine whether the lsb package is installed +# If it is, determine which lsb is installed: +# redhat, suse, or standard lsb + +if test -f /etc/init.d/functions +then + lsbtype="rh" + . /etc/init.d/functions +elif test -f /etc/rc.status +then + lsbtype="suse" + . /etc/rc.status +elif test -f /lib/lsb/init-functions +then + lsbtype="lsb" + . /lib/lsb/init-functions +elif test -f /etc/gentoo-release +then + lsbtype="gentoo" + . /sbin/functions.sh +else + lsbtype="nolsb" +fi + +print_outcome() +{ + + case "${lsbtype}" in + + suse) + rc_status -v + ;; + + lsb) + if test "$?" -eq 0 + then + log_success_msg "success" + else + log_failure_msg "failed" + fi + ;; + + gentoo) + eend $? + ;; + + nolsb | rh) + if test "$?" -eq 0 + then + echo " ... success" + fi + if test "$?" -ne 0 + then + echo " ... failed" + fi + ;; + esac +} + +start() { + case "${lsbtype}" in + + suse) + echo -n "Starting $prog: " + startproc /usr/sbin/openhpid -c /etc/openhpi/openhpi.conf + RETVAL=$? + ;; + lsb) + echo -n "Starting $prog: " + start_daemon /usr/sbin/openhpid -c /etc/openhpi/openhpi.conf + RETVAL=$? + ;; + gentoo | rh) + echo "Starting $prog: " + start-stop-daemon --start --quiet --exec /usr/sbin/openhpid -- -c /etc/openhpi/openhpi.conf + RETVAL=$? + ;; + nolsb) + echo -n "Starting $prog: " + /usr/sbin/openhpid -c /etc/openhpi/openhpi.conf + RETVAL=$? + ;; + + esac + + print_outcome + +} + +stop() { + case "${lsbtype}" in + + lsb | suse) + echo -n "Stopping $prog: " + killproc /usr/sbin/openhpid + RETVAL=$? + ;; + + gentoo) + echo "Stopping $prog: " + start-stop-daemon --stop --quiet --exec /usr/sbin/openhpid + RETVAL=$? + ;; + + nolsb | rh) + echo -n "Stopping $prog: " + if test -f /var/run/openhpid.pid && test "`cat /var/run/openhpid.pid`" != "" + then + kill "`cat /var/run/openhpid.pid`" + RETVAL=$? + else + RETVAL=0 + fi + ;; + + esac + + print_outcome + + if test "$RETVAL" -eq 0 && test -f /var/run/openhpid.pid + then + rm -f /var/lock/openhpid + rm -f /var/run/openhpid.pid + fi + +} + +dstatus() { + echo "Checking for $prog daemon: " + + case "${lsbtype}" in + + suse) + checkproc /usr/sbin/openhpid + rc_status -v + ;; + lsb) + pid="`pidofproc /usr/sbin/openhpid`" + if test "${pid}" != "" + then + log_success_msg "$prog is running" + else + log_success_msg "$prog is not running" + fi + ;; + gentoo | nolsb | rh) + if test -f /var/run/openhpid.pid && + test "`cat /var/run/openhpid.pid`" != "" && + kill -s 0 "`cat /var/run/openhpid.pid`" + then + echo "$prog is running" + else + echo "$prog is not running" + fi + + ;; + + esac + + + +} + +restart() { + stop + start +} + +force_reload() { + # We don't currently support a reload, but can do a restart + stop + start +} + +# See how we were called. + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + status) + dstatus + ;; + force-reload) + force_reload + ;; + *) + echo "Usage: $0 {start|stop|restart|status|force-reload}" + exit 1 +esac diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpid.service b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpid.service new file mode 100644 index 000000000..cd4168f8e --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpid.service @@ -0,0 +1,11 @@ +[Unit] +Description=Daemon providing access to the SAF Hardware Platform Interface +After=syslog.target + +[Service] +Type=forking +PIDFile=/var/run/openhpid.pid +ExecStart=@SBINDIR@/openhpid -c @SYSCONFDIR@/openhpi/openhpi.conf + +[Install] +WantedBy=multi-user.target diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/run-ptest b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/run-ptest new file mode 100755 index 000000000..5b187d908 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/run-ptest @@ -0,0 +1,5 @@ +#!/bin/sh +for x in `find ./ -name Makefile`; +do + make -C `dirname ${x}` -k runtest-TESTS +done diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb b/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb new file mode 100644 index 000000000..ecf71d70f --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb @@ -0,0 +1,115 @@ +SUMMARY = "Hardware Platform Interface Library and Tools" + +DESCRIPTION = "\ +OpenHPI is an open source project created with the intent of providing an \ +implementation of the SA Forum's Hardware Platform Interface (HPI). HPI \ +provides an abstracted interface to managing computer hardware, typically for \ +chassis and rack based servers. HPI includes resource modeling; access to and \ +control over sensor, control, watchdog, and inventory data associated with \ +resources; abstracted System Event Log interfaces; hardware events and alerts; \ +and a managed hotswap interface. \ +\ +OpenHPI provides a modular mechanism for adding new hardware and device support \ +easily. Many plugins exist in the OpenHPI source tree to provide access to \ +various types of hardware. This includes, but is not limited to, IPMI based \ +servers, Blade Center, and machines which export data via sysfs. \ +" + +HOMEPAGE = "http://openhpi.sourceforge.net/Home" +SECTION = "net" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4" + +DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs autoconf-archive-native" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ + file://openhpi.init \ + file://openhpid.service \ + file://run-ptest \ + file://openhpi-netsnmp-cross-compile.patch \ + file://openhpi-sysfs-cross-compile.patch \ + file://openhpi-libxml2-cross-compile.patch \ + file://openhpi-glib-cross-compile.patch \ + file://openhpi-linkfix.patch \ + file://openhpi-fix-host-gcc.patch \ + file://openhpi-hpi-shell-thread-fix.patch \ + file://openhpi-fix-testfail-errors.patch \ + file://openhpi-add-libnetsnmp-when-link.patch \ + file://openhpi-invalide-session.patch \ + file://openhpi-use-serial-tests-config-needed-by-ptest.patch \ + file://openhpi-fix-alignment-issue.patch \ + file://0001-Fix-build-failures-with-gcc7.patch \ + file://c++11.patch \ + file://clang-c++11.patch \ + file://fix-narrowing-warning.patch \ + file://0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch \ + file://0001-ipmidirect-Replace-__STRING.patch \ + " + +SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23" +SRC_URI[sha256sum] = "e0a810cb401c4bdcfc9551f2e6afd5a8ca4b411f5ee3bc60c19f82fd6e84a3dc" + +inherit autotools pkgconfig ptest update-rc.d systemd + +PACKAGES =+ "${PN}-libs" + +FILES_${PN}-libs = "${libdir}/${BPN}/*.so /usr/lib/${BPN}/*.so" + +INSANE_SKIP_${PN}-libs = "dev-so" +RDEPENDS_${PN} += "${PN}-libs" + +PACKAGECONFIG ??= "libgcrypt non32bit" +PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils," +PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt," +PACKAGECONFIG[non32bit] = "--enable-non32bit-int,--disable-non32bit-int,," + +do_install_append () { + install -m 0755 -d ${D}${sysconfdir}/${BPN} + install -m 0755 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf + install -m 0700 ${S}/openhpi.conf.example ${D}${sysconfdir}/${BPN}/openhpi.conf + install -m 0755 ${S}/simulation.data.example ${D}${sysconfdir}/${BPN}/simulation.data + install -m 0755 ${S}/test_agent.data.example ${D}${sysconfdir}/${BPN}/test_agent.data + install -m 0755 ${WORKDIR}/openhpi.init ${D}${sysconfdir}/init.d/openhpid + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/openhpid.service ${D}${systemd_unitdir}/system + sed -i -e "s,@SBINDIR@,${sbindir},g" -e "s,@SYSCONFDIR@,${sysconfdir},g" \ + ${D}${systemd_unitdir}/system/openhpid.service +} + +do_compile_ptest () { + for x in `find ${B} -name Makefile -exec grep -l buildtest-TESTS {} \;`; do + dir=`dirname ${x}` + upper=`dirname ${dir}` + if [ `basename ${upper}` != "cpp" ]; then + oe_runmake -C ${dir} buildtest-TESTS + fi + done +} + +do_install_ptest () { + cp -rf ${B}/openhpid/t/ohpi/.libs/* ${B}/openhpid/t/ohpi/ + TESTS="utils marshal openhpid" + for subtest in ${TESTS}; do + mkdir -p ${D}${PTEST_PATH}/${subtest}/t + cp -rf ${B}/${subtest}/t/* ${D}${PTEST_PATH}/${subtest}/t + done + + for x in `find ${D}${PTEST_PATH} -name Makefile`; do + sed -i "s:${S}:${PTEST_PATH}/:g" ${x}; + sed -i "s/^Makefile:/MM:/g" ${x}; + done; + + mkdir -p ${D}${PTEST_PATH}/plugins/watchdog/ + cp -L ${D}/${libdir}/${BPN}/libwatchdog.so ${D}${PTEST_PATH}/plugins/watchdog/ + cp -L ${D}/${libdir}/${BPN}/libsimulator.so ${D}${PTEST_PATH}/plugins/watchdog/ + find ${D}${PTEST_PATH}/ -name "*.c" -exec rm {} \; + find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \; + find ${D}${PTEST_PATH}/ -name "*.h" -exec rm {} \; +} + +INITSCRIPT_NAME = "openhpid" +INITSCRIPT_PARAMS = "start 30 . stop 70 0 1 2 3 4 5 6 ." + +SYSTEMD_SERVICE_${PN} = "openhpid.service" +SYSTEMD_AUTO_ENABLE = "disable" |