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/host_check.cpp b/host_check.cpp
index 7e6dbef..ced4ba3 100644
--- a/host_check.cpp
+++ b/host_check.cpp
@@ -46,7 +46,7 @@
// Find all implementations of Condition interface and check if host is
// running over it
-bool checkFirmwareConditionRunning(sdbusplus::bus::bus& bus)
+bool checkFirmwareConditionRunning(sdbusplus::bus_t& bus)
{
using FirmwareCondition = HostFirmware::FirmwareCondition;
// Find all implementations of host firmware condition interface
@@ -63,7 +63,7 @@
auto mapperResponseMsg = bus.call(mapper);
mapperResponseMsg.read(mapperResponse);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
error(
"Error in mapper GetSubTree call for HostFirmware condition: {ERROR}",
@@ -116,7 +116,7 @@
return true;
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
error("Error reading HostFirmware condition, error: {ERROR}, "
"service: {SERVICE} path: {PATH}",
@@ -129,7 +129,7 @@
}
// Helper function to check if chassis power is on
-bool isChassiPowerOn(sdbusplus::bus::bus& bus, size_t id)
+bool isChassiPowerOn(sdbusplus::bus_t& bus, size_t id)
{
auto svcname = std::string{CHASSIS_STATE_SVC} + std::to_string(id);
auto objpath = std::string{CHASSIS_STATE_PATH} + std::to_string(id);
@@ -153,7 +153,7 @@
return true;
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
error("Error reading Chassis Power State, error: {ERROR}, "
"service: {SERVICE} path: {PATH}",