Cater for change in elog create and commit interface
Change-Id: I2a3fb65781965502d705bca772ebfb11e2334af9
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
diff --git a/sysfs.cpp b/sysfs.cpp
index 389b297..e6b17fd 100644
--- a/sysfs.cpp
+++ b/sysfs.cpp
@@ -83,19 +83,13 @@
auto rc = errno;
instancePath /= "device";
using namespace sdbusplus::xyz::openbmc_project::Sensor::Device::Error;
- try
- {
- elog<ReadFailure>(
- xyz::openbmc_project::Sensor::Device::
- ReadFailure::CALLOUT_ERRNO(rc),
- xyz::openbmc_project::Sensor::Device::
- ReadFailure::CALLOUT_DEVICE_PATH(
- fs::canonical(instancePath).c_str()));
- }
- catch (ReadFailure& elog)
- {
- commit(elog.name());
- }
+ report<ReadFailure>(
+ xyz::openbmc_project::Sensor::Device::
+ ReadFailure::CALLOUT_ERRNO(rc),
+ xyz::openbmc_project::Sensor::Device::
+ ReadFailure::CALLOUT_DEVICE_PATH(
+ fs::canonical(instancePath).c_str()));
+
exit(EXIT_FAILURE);
}
@@ -133,19 +127,13 @@
auto rc = errno;
instancePath /= "device";
using namespace sdbusplus::xyz::openbmc_project::Control::Device::Error;
- try
- {
- elog<WriteFailure>(
- xyz::openbmc_project::Control::Device::
- WriteFailure::CALLOUT_ERRNO(rc),
- xyz::openbmc_project::Control::Device::
- WriteFailure::CALLOUT_DEVICE_PATH(
- fs::canonical(instancePath).c_str()));
- }
- catch (WriteFailure& elog)
- {
- commit(elog.name());
- }
+ report<WriteFailure>(
+ xyz::openbmc_project::Control::Device::
+ WriteFailure::CALLOUT_ERRNO(rc),
+ xyz::openbmc_project::Control::Device::
+ WriteFailure::CALLOUT_DEVICE_PATH(
+ fs::canonical(instancePath).c_str()));
+
exit(EXIT_FAILURE);
}