From ab00e2c95959ff546d6da72bde6bf2e664f62aff Mon Sep 17 00:00:00 2001 From: crgeddes Date: Wed, 10 Aug 2016 10:15:01 -0500 Subject: Fix pib err mask to actually look at the Userdetails section data Previously there was a bug with pib_err_mask where we incorrectly tried to cast a userdetails object into an incorrect structure. This caused an issue when we tried to access members of the struct that we were casting to. This commit changes the function that provides lookup of userdetails sections so it only returns the user data that the user details section contains. Change-Id: I38d6bbef8525a177b3f1baf72ea042c8e756c34d Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28105 Tested-by: Jenkins Server Reviewed-by: Matt Derksen Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/usr/errl/errlentry.C | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/usr/errl') diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index 2cc64faf1..20d6782f1 100644 --- a/src/usr/errl/errlentry.C +++ b/src/usr/errl/errlentry.C @@ -1658,16 +1658,20 @@ uint64_t ErrlEntry::unflatten( const void * i_buffer, uint64_t i_len ) } //@brief Return the list of User Detail sections -//NOTE: You can pass COMP_ID 0 into this function for wildcard -std::vector ErrlEntry::getUDSections(compId_t i_compId) +//NOTE: You can pass COMP_ID or subsect 0 into this function for wildcard +std::vector ErrlEntry::getUDSections(compId_t i_compId, + uint8_t i_subSect) { - std::vector copy_vector; + std::vector copy_vector; for(auto const & section : iv_SectionVector) { if((section->compId() == i_compId) || (i_compId == 0)) { - copy_vector.push_back(section); + if((section->subSect() == i_subSect) || (i_subSect == 0)) + { + copy_vector.push_back(section->iv_pData); + } } } -- cgit v1.2.3