sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I96286490697ce5d7fecc1c9c358f5f1d054137ec
diff --git a/activation.cpp b/activation.cpp
index bfcd546..94820aa 100644
--- a/activation.cpp
+++ b/activation.cpp
@@ -46,7 +46,7 @@
{
this->bus.call_noreply(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
if (e.name() != nullptr &&
strcmp("org.freedesktop.systemd1.AlreadySubscribed", e.name()) == 0)
@@ -72,7 +72,7 @@
{
this->bus.call_noreply(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
error("Error unsubscribing from systemd signals: {ERROR}", "ERROR", e);
}
@@ -246,7 +246,7 @@
{
bus.call_noreply(deleteMethod);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
error(
"Error deleting image ({PATH}) from image manager: {ERROR}",
@@ -255,7 +255,7 @@
}
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
error("Error in mapper method call for ({PATH}, {INTERFACE}: {ERROR}",
"ERROR", e, "PATH", path, "INTERFACE", interface);
@@ -302,7 +302,7 @@
return softwareServer::RedundancyPriority::priority(value);
}
-void Activation::unitStateChange(sdbusplus::message::message& msg)
+void Activation::unitStateChange(sdbusplus::message_t& msg)
{
if (softwareServer::Activation::activation() !=
softwareServer::Activation::Activations::Activating)
@@ -384,7 +384,7 @@
return true;
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
error("Error in getting ApplyTime: {ERROR}", "ERROR", e);
}
@@ -403,14 +403,14 @@
{
auto reply = bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
error("Error in trying to upgrade Host Bios: {ERROR}", "ERROR", e);
report<InternalFailure>();
}
}
-void Activation::onStateChangesBios(sdbusplus::message::message& msg)
+void Activation::onStateChangesBios(sdbusplus::message_t& msg)
{
uint32_t newStateID{};
sdbusplus::message::object_path newStateObjPath;
@@ -467,7 +467,7 @@
{
auto reply = bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
alert("Error in trying to reboot the BMC. The BMC needs to be manually "
"rebooted to complete the image activation. {ERROR}",