diff options
author | Brian Bakke <bbakke@us.ibm.com> | 2018-01-22 10:47:15 -0600 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-01-23 09:19:27 -0500 |
commit | 5e8ed1d75c2a76cc93603ff738b63a21ffc2efc1 (patch) | |
tree | 283bd3e7856e6e73bbd8affa675e80e7586eed1a /src/usr/targeting/attroverride | |
parent | 5bb1802ad0aed2ad6b44ce95d82f3545d3a1a0cf (diff) | |
download | talos-hostboot-5e8ed1d75c2a76cc93603ff738b63a21ffc2efc1.tar.gz talos-hostboot-5e8ed1d75c2a76cc93603ff738b63a21ffc2efc1.zip |
Bad target parsing in attributeOverride tool
Change-Id: Ibb96b1584ee820cd071bc3f9debffd2077e966c2
RTC:186173
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52370
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/attroverride')
-rwxr-xr-x | src/usr/targeting/attroverride/attrTextToBinaryBlob.C | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/src/usr/targeting/attroverride/attrTextToBinaryBlob.C b/src/usr/targeting/attroverride/attrTextToBinaryBlob.C index 545b181a7..b0bf6947a 100755 --- a/src/usr/targeting/attroverride/attrTextToBinaryBlob.C +++ b/src/usr/targeting/attroverride/attrTextToBinaryBlob.C @@ -1255,12 +1255,22 @@ bool AttrTextToBinaryBlob::validateTargLine( const std::string & i_line ) skipChipPosn = chipPosn + l_searchString.size(); } - if // (chip string is in the target string) AND - // (is not at the end of the target string) AND - // (is not followed by ".") - ( (chipPosn != std::string::npos) && - (skipChipPosn < l_line.size()) && - ((l_line.substr(skipChipPosn, 1)) != "." ) ) + if // (chip string is not in the target string) + ( chipPosn == std::string::npos ) + { + // (keep looking) + } + + else if // (chip string is at the end of the target string) OR + // (is followed by ".") + ( (skipChipPosn >= l_line.size()) || + ((l_line.substr(skipChipPosn, 1)) == "." ) ) + { + // (done searching thru chip strings) + break; + } + + else { std::string l_trlParmLine = l_line.substr(skipChipPosn, l_line.size()); @@ -1273,17 +1283,14 @@ bool AttrTextToBinaryBlob::validateTargLine( const std::string & i_line ) printf("validateTargLine : Error : " "Nonsense parm :c in processor or " "memory buffer target \n" ); - break; } else { - // keep looking + // (done searching thru chip strings) } - } // end chip string found - else - { - // (keep looking) - } + + break; + } // end else } // end processor or memory buffer else { |