summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting/attroverride
diff options
context:
space:
mode:
authorcrgeddes <crgeddes@us.ibm.com>2015-07-27 16:20:24 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-09-29 11:22:43 -0500
commit280a8c6c5dcd401fffdf3c720d5425b4a990fb12 (patch)
tree7078e393d363c7727147ad7513f22c006ad374a7 /src/usr/targeting/attroverride
parent9484d4302295c52d3a40542fc205a729672c9e45 (diff)
downloadtalos-hostboot-280a8c6c5dcd401fffdf3c720d5425b4a990fb12.tar.gz
talos-hostboot-280a8c6c5dcd401fffdf3c720d5425b4a990fb12.zip
Attribute Override Tool Fixes
The tool was having issues parsing out the targets type. This is fixed now, also I added 'pu' as a valid string to be used to target proc targets. Change-Id: If01a246221b19b7fd3b4e6b24d23a0ed3bf0aac0 RTC: 131731 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19369 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins OP HW Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/attroverride')
-rwxr-xr-xsrc/usr/targeting/attroverride/attrTextToBinaryBlob.C14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/usr/targeting/attroverride/attrTextToBinaryBlob.C b/src/usr/targeting/attroverride/attrTextToBinaryBlob.C
index a34cdac38..26522e8da 100755
--- a/src/usr/targeting/attroverride/attrTextToBinaryBlob.C
+++ b/src/usr/targeting/attroverride/attrTextToBinaryBlob.C
@@ -101,7 +101,8 @@ const struct TargStrToType
{"p8.abus", fapi::TARGET_TYPE_ABUS_ENDPOINT,TARGETING::TYPE_ABUS},
{"centaur", fapi::TARGET_TYPE_MEMBUF_CHIP, TARGETING::TYPE_MEMBUF},
{"p8", fapi::TARGET_TYPE_PROC_CHIP, TARGETING::TYPE_PROC},
- {"dimm", fapi::TARGET_TYPE_DIMM, TARGETING::TYPE_DIMM}
+ {"dimm", fapi::TARGET_TYPE_DIMM, TARGETING::TYPE_DIMM},
+ {"pu", fapi::TARGET_TYPE_PROC_CHIP, TARGETING::TYPE_PROC}
};
bool operator==(const TargStrToType& i, const std::string& v)
@@ -532,10 +533,16 @@ void AttrTextToBinaryBlob::attrFileTargetLineToData(
// Figure out the target type
const TargStrToType* last =
- &TARG_STR_TO_TYPE[sizeof(TARG_STR_TO_TYPE)/sizeof(TargStrToType)];
+ &TARG_STR_TO_TYPE[sizeof(TARG_STR_TO_TYPE)/sizeof(TargStrToType) -1];
+
+ //not sure how long the string representing the title will be
+ //therefore we must look up the next colon and take all chars up to
+ //the colon and assume that is the string representation of the target.
+ size_t nextColon = l_line.find(':');
+ std::string l_targetString = l_line.substr(0, nextColon);
const TargStrToType* item =
- std::find(&TARG_STR_TO_TYPE[0], last, l_line);
+ std::find(&TARG_STR_TO_TYPE[0], last, l_targetString);
if (item != last)
{
@@ -545,6 +552,7 @@ void AttrTextToBinaryBlob::attrFileTargetLineToData(
l_sysTarget = false;
}
+
// For a non-system target, figure out the position and unit position
if (l_sysTarget == false)
{
OpenPOWER on IntegriCloud