Support 0xFF fru_type values
The OCC may put a value of 0xFF as the FRU type for some temperature
sensors to indicate they aren't available on the platform. In this
case, the OCC device driver won't even make a tempX_input file for them.
Check for this case and just continue on.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I27dbc63270bfc60eed9d93eeb844625572839e38
diff --git a/occ_manager.cpp b/occ_manager.cpp
index 4c979df..ea66cd4 100644
--- a/occ_manager.cpp
+++ b/occ_manager.cpp
@@ -18,6 +18,8 @@
namespace occ
{
+constexpr uint32_t fruTypeNotAvailable = 0xFF;
+
using namespace phosphor::logging;
void Manager::findAndCreateObjects()
@@ -258,6 +260,12 @@
if (type == OCC_DIMM_TEMP_SENSOR_TYPE)
{
+ if (fruTypeValue == fruTypeNotAvailable)
+ {
+ // Not all DIMM related temps are available to read
+ // (no _input file in this case)
+ continue;
+ }
auto iter = dimmTempSensorName.find(fruTypeValue);
if (iter == dimmTempSensorName.end())
{