errors: Use non-deprecated namespaces
The error namespaces have been updated. Reference:
https://gerrit.openbmc.org/c/openbmc/sdbusplus/+/66308
https://gerrit.openbmc.org/c/openbmc/phosphor-logging/+/66463
Tested: Compiled with the SDBUSPP_REMOVE_DEPRECATED_NAMESPACE option.
Change-Id: Idd1ca6f14635039bd8bd2f34d69afd3e97588648
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/activation.cpp b/activation.cpp
index b5fe199..8f4c4c0 100644
--- a/activation.cpp
+++ b/activation.cpp
@@ -32,7 +32,7 @@
PHOSPHOR_LOG2_USING;
using namespace phosphor::logging;
using InternalFailure =
- sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
+ sdbusplus::error::xyz::openbmc_project::common::InternalFailure;
#ifdef WANT_SIGNATURE_VERIFY
namespace control = sdbusplus::server::xyz::openbmc_project::control;
@@ -94,8 +94,8 @@
fs::path uploadDir(IMG_UPLOAD_DIR);
if (!verifySignature(uploadDir / versionId, SIGNED_IMAGE_CONF_PATH))
{
- using InvalidSignatureErr = sdbusplus::xyz::openbmc_project::
- Software::Version::Error::InvalidSignature;
+ using InvalidSignatureErr = sdbusplus::error::xyz::openbmc_project::
+ software::version::InvalidSignature;
report<InvalidSignatureErr>();
// Stop the activation process, if fieldMode is enabled.
if (parent.control::FieldMode::fieldModeEnabled())
diff --git a/activation.hpp b/activation.hpp
index 04562ea..f813886 100644
--- a/activation.hpp
+++ b/activation.hpp
@@ -33,8 +33,8 @@
sdbusplus::server::xyz::openbmc_project::software::Activation,
sdbusplus::server::xyz::openbmc_project::association::Definitions>;
using ActivationBlocksTransitionInherit =
- sdbusplus::server::object_t<sdbusplus::xyz::openbmc_project::Software::
- server::ActivationBlocksTransition>;
+ sdbusplus::server::object_t<sdbusplus::server::xyz::openbmc_project::
+ software::ActivationBlocksTransition>;
using RedundancyPriorityInherit = sdbusplus::server::object_t<
sdbusplus::server::xyz::openbmc_project::software::RedundancyPriority>;
using ActivationProgressInherit = sdbusplus::server::object_t<
diff --git a/download_manager.cpp b/download_manager.cpp
index 1197851..71a5255 100644
--- a/download_manager.cpp
+++ b/download_manager.cpp
@@ -24,14 +24,14 @@
namespace manager
{
-using namespace sdbusplus::xyz::openbmc_project::Common::Error;
+using namespace sdbusplus::error::xyz::openbmc_project::common;
PHOSPHOR_LOG2_USING;
using namespace phosphor::logging;
namespace fs = std::filesystem;
void Download::downloadViaTFTP(std::string fileName, std::string serverAddress)
{
- using Argument = xyz::openbmc_project::Common::InvalidArgument;
+ using Argument = xyz::openbmc_project::common::InvalidArgument;
// Sanitize the fileName string
if (!fileName.empty())
diff --git a/image_manager.cpp b/image_manager.cpp
index 4fc4f8e..46f023a 100644
--- a/image_manager.cpp
+++ b/image_manager.cpp
@@ -33,12 +33,12 @@
PHOSPHOR_LOG2_USING;
using namespace phosphor::logging;
-using namespace sdbusplus::xyz::openbmc_project::Software::Image::Error;
-namespace Software = phosphor::logging::xyz::openbmc_project::Software;
-using ManifestFail = Software::Image::ManifestFileFailure;
-using UnTarFail = Software::Image::UnTarFailure;
-using InternalFail = Software::Image::InternalFailure;
-using ImageFail = Software::Image::ImageFailure;
+using namespace sdbusplus::error::xyz::openbmc_project::software::image;
+namespace Software = phosphor::logging::xyz::openbmc_project::software;
+using ManifestFail = Software::image::ManifestFileFailure;
+using UnTarFail = Software::image::UnTarFailure;
+using InternalFail = Software::image::InternalFailure;
+using ImageFail = Software::image::ImageFailure;
namespace fs = std::filesystem;
struct RemovablePath
diff --git a/image_verify.cpp b/image_verify.cpp
index b5805f5..52ef3ef 100644
--- a/image_verify.cpp
+++ b/image_verify.cpp
@@ -31,7 +31,7 @@
using namespace phosphor::logging;
using namespace phosphor::software::manager;
using InternalFailure =
- sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
+ sdbusplus::error::xyz::openbmc_project::common::InternalFailure;
constexpr auto keyTypeTag = "KeyType";
constexpr auto hashFunctionTag = "HashType";
diff --git a/item_updater.cpp b/item_updater.cpp
index 4b170db..9cb9467 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -34,10 +34,10 @@
PHOSPHOR_LOG2_USING;
using namespace phosphor::logging;
-using namespace sdbusplus::xyz::openbmc_project::Software::Image::Error;
+using namespace sdbusplus::error::xyz::openbmc_project::software::image;
using namespace phosphor::software::image;
namespace fs = std::filesystem;
-using NotAllowed = sdbusplus::xyz::openbmc_project::Common::Error::NotAllowed;
+using NotAllowed = sdbusplus::error::xyz::openbmc_project::common::NotAllowed;
void ItemUpdater::createActivation(sdbusplus::message_t& msg)
{
@@ -596,7 +596,7 @@
}
else if (!value && control::FieldMode::fieldModeEnabled())
{
- elog<NotAllowed>(xyz::openbmc_project::Common::NotAllowed::REASON(
+ elog<NotAllowed>(xyz::openbmc_project::common::NotAllowed::REASON(
"FieldMode is not allowed to be cleared"));
}
diff --git a/msl_verify.cpp b/msl_verify.cpp
index 049ac9a..c9f8bce 100644
--- a/msl_verify.cpp
+++ b/msl_verify.cpp
@@ -85,10 +85,10 @@
if (rc < 0)
{
using namespace phosphor::logging;
- using IncompatibleErr = sdbusplus::xyz::openbmc_project::Software::
- Version::Error::Incompatible;
+ using IncompatibleErr = sdbusplus::error::xyz::openbmc_project::
+ software::version::Incompatible;
using Incompatible =
- xyz::openbmc_project::Software::Version::Incompatible;
+ xyz::openbmc_project::software::version::Incompatible;
std::string purpose =
"xyz.openbmc_project.Software.Version.VersionPurpose.BMC";
diff --git a/version.cpp b/version.cpp
index b8b1247..54b8c27 100644
--- a/version.cpp
+++ b/version.cpp
@@ -24,8 +24,8 @@
PHOSPHOR_LOG2_USING;
using namespace phosphor::logging;
-using Argument = xyz::openbmc_project::Common::InvalidArgument;
-using namespace sdbusplus::xyz::openbmc_project::Common::Error;
+using Argument = xyz::openbmc_project::common::InvalidArgument;
+using namespace sdbusplus::error::xyz::openbmc_project::common;
std::string Version::getValue(const std::string& manifestFilePath,
std::string key)