PEL: Update Deconfig D-Bus property after clear
When a fan or power supply is replaced, the deconfig flag field in the
PEL is cleared. There is also a Deconfig property on D-Bus that should
match the PEL field, but the code to clear that was missed, so add it.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I6fc971953b6e4d1e1c2da421bbc920923b199dbb
diff --git a/extensions/openpower-pels/repository.cpp b/extensions/openpower-pels/repository.cpp
index bc5249d..1860154 100644
--- a/extensions/openpower-pels/repository.cpp
+++ b/extensions/openpower-pels/repository.cpp
@@ -449,7 +449,7 @@
}
}
-void Repository::updatePEL(const fs::path& path, PELUpdateFunc updateFunc)
+bool Repository::updatePEL(const fs::path& path, PELUpdateFunc updateFunc)
{
std::ifstream file{path};
std::vector<uint8_t> data{std::istreambuf_iterator<char>(file),
@@ -481,6 +481,7 @@
}
write(pel, path);
+ return true;
}
}
else
@@ -488,6 +489,7 @@
throw std::runtime_error(
"Unable to read a valid PEL when trying to update it");
}
+ return false;
}
bool Repository::isServiceableSev(const PELAttributes& pel)