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: Ie7375047bd567aa052d3bd35a6dd7008779a05b4
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index 12fdae7..910330d 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -117,7 +117,7 @@
static constexpr const char* dBusPropertySetMethod = "Set";
// return code: 0 successful
-int8_t getChassisSerialNumber(sdbusplus::bus::bus& bus, std::string& serial)
+int8_t getChassisSerialNumber(sdbusplus::bus_t& bus, std::string& serial)
{
std::string objpath = "/xyz/openbmc_project/FruDevice";
std::string intf = "xyz.openbmc_project.FruDeviceManager";
@@ -439,7 +439,7 @@
hsbpObjPath, biosVersionIntf, "Version");
hscVersion = std::get<std::string>(hscVersionValue);
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
phosphor::logging::log<phosphor::logging::level::INFO>(
"Failed to retrieve HSBP version information",
@@ -1481,7 +1481,7 @@
} // namespace ledAction
-int8_t getLEDState(sdbusplus::bus::bus& bus, const std::string& intf,
+int8_t getLEDState(sdbusplus::bus_t& bus, const std::string& intf,
const std::string& objPath, uint8_t& state)
{
try
@@ -1494,7 +1494,7 @@
sdbusplus::xyz::openbmc_project::Led::server::Physical::
convertActionFromString(strState));
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
return -1;
@@ -1657,7 +1657,7 @@
"/xyz/openbmc_project/control/thermal_mode";
bool getFanProfileInterface(
- sdbusplus::bus::bus& bus,
+ sdbusplus::bus_t& bus,
boost::container::flat_map<
std::string, std::variant<std::vector<std::string>, std::string>>& resp)
{
@@ -3196,7 +3196,7 @@
return ipmi::responseResponseError();
}
}
- catch (const sdbusplus::exception::exception& e)
+ catch (const sdbusplus::exception_t& e)
{
phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
return ipmi::responseResponseError();