Use all phosphor-dbus-interfaces errors
Remove the local error definitions and use the
ones in phosphor-dbus-interfaces instead as the ones
there suit our purposes and it simplifies this repository
to do so.
Change-Id: I18428c496914153270ecb181e7193acd0e386e97
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/targeting.cpp b/targeting.cpp
index ce3fc67..205bf68 100644
--- a/targeting.cpp
+++ b/targeting.cpp
@@ -16,10 +16,11 @@
#include <endian.h>
#include <experimental/filesystem>
+#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
#include <regex>
-#include <phosphor-logging/elog.hpp>
-#include "elog-errors.hpp"
+#include <xyz/openbmc_project/Common/File/error.hpp>
#include "targeting.hpp"
@@ -30,6 +31,7 @@
using namespace phosphor::logging;
namespace fs = std::experimental::filesystem;
+namespace file_error = sdbusplus::xyz::openbmc_project::Common::File::Error;
int Target::getCFAMFD()
{
@@ -119,9 +121,11 @@
}
catch (fs::filesystem_error& e)
{
- elog<org::open_power::Proc::CFAM::OpenFailure>(
- org::open_power::Proc::CFAM::OpenFailure::ERRNO(e.code().value()),
- org::open_power::Proc::CFAM::OpenFailure::PATH(e.path1().c_str()));
+ using metadata = xyz::openbmc_project::Common::File::Open;
+
+ elog<file_error::Open>(
+ metadata::ERRNO(e.code().value()),
+ metadata::PATH(e.path1().c_str()));
}
auto sortTargets = [](const std::unique_ptr<Target>& left,