summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting/common/utilFilter.C
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2017-09-12 16:26:51 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-09-14 09:27:05 -0400
commitc2ce20992dee0a7d1b23f4b5e8cdb870e29e2fcc (patch)
tree5ad759f5c1f2411896a10fd6017b6311beddb17f /src/usr/targeting/common/utilFilter.C
parent8a4cc1d6b3770dade628f77bcb01ed397181730d (diff)
downloadtalos-hostboot-c2ce20992dee0a7d1b23f4b5e8cdb870e29e2fcc.tar.gz
talos-hostboot-c2ce20992dee0a7d1b23f4b5e8cdb870e29e2fcc.zip
Improve error messages for getParent API on TARGETING namespace
I see these errors all the time and I always think they could be better Change-Id: I68d796d5ff06783eb1d7122ee66e6403f26a59eb Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46112 Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@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> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/common/utilFilter.C')
-rw-r--r--src/usr/targeting/common/utilFilter.C14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/usr/targeting/common/utilFilter.C b/src/usr/targeting/common/utilFilter.C
index 928aa64d6..d94f69073 100644
--- a/src/usr/targeting/common/utilFilter.C
+++ b/src/usr/targeting/common/utilFilter.C
@@ -443,9 +443,13 @@ const Target * getParentChip( const Target * i_pChiplet )
{
l_pChip = l_chipList[0];
}
+ else if (l_chipList.size() == 0)
+ {
+ TARG_ERR("Failed to find a parent chip target for huid=%.8X", TARGETING::get_huid(i_pChiplet));
+ }
else
{
- TARG_ERR("Number of Parent chip is not 1, but %d | huid=%.8X",l_chipList.size(), TARGETING::get_huid(i_pChiplet));
+ TARG_ERR("Found %d parent chip targets for huid=%.8X, expected to only find 1",l_chipList.size(), TARGETING::get_huid(i_pChiplet));
}
return l_pChip;
@@ -470,9 +474,15 @@ const Target * getParent( const Target * i_unit , TARGETING::TYPE &i_pType)
{
l_parent = l_chipList[0];
}
+ else if (l_chipList.size() == 0)
+ {
+ TARG_ERR("Failed to find a parent target for huid=%.8X", TARGETING::get_huid(i_unit));
+ }
else
{
- TARG_ERR("Number of Parent chip is not 1, but %d",l_chipList.size());
+ TARG_ERR("Found %d parent targets for huid=%.8X, only expected to find 1",
+ l_chipList.size(),
+ TARGETING::get_huid(i_unit));
}
return l_parent;
OpenPOWER on IntegriCloud