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: I41103c892db258a85640aa1442acd9a295c8a847
diff --git a/bmc_state_manager.cpp b/bmc_state_manager.cpp
index 85eb3cf..e1cbaf2 100644
--- a/bmc_state_manager.cpp
+++ b/bmc_state_manager.cpp
@@ -59,7 +59,7 @@
auto result = this->bus.call(method);
result.read(unitTargetPath);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
// Not all input units will have been loaded yet so just return an
// empty string if an exception is caught in this path
@@ -81,7 +81,7 @@
// Is input target active or inactive?
result.read(currentState);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
info("Error in ActiveState Get: {ERROR}", "ERROR", e);
return std::string{};
@@ -125,7 +125,7 @@
{
this->bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
error("Failed to subscribe to systemd signals: {ERROR}", "ERROR", e);
elog<InternalFailure>();
@@ -151,7 +151,7 @@
{
this->bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
info("Error in HardReboot: {ERROR}", "ERROR", e);
}
@@ -181,7 +181,7 @@
{
this->bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
info("Error in StartUnit - replace-irreversibly: {ERROR}", "ERROR",
e);
@@ -190,7 +190,7 @@
return;
}
-int BMC::bmcStateChange(sdbusplus::message::message& msg)
+int BMC::bmcStateChange(sdbusplus::message_t& msg)
{
uint32_t newStateID{};
sdbusplus::message::object_path newStateObjPath;
@@ -215,7 +215,7 @@
{
this->bus.call(method);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
info("Error in Unsubscribe: {ERROR}", "ERROR", e);
}