summaryrefslogtreecommitdiffstats
path: root/utils.cpp
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2018-09-14 14:50:03 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-10-18 16:43:22 -0400
commit94df8c9015798764d40665bb363bdbf27510f285 (patch)
treece26611a482f2f03a582838faec29eeb065a6c47 /utils.cpp
parent7db89e36d7c5649b826b607cb2d90e38bb02ab86 (diff)
downloadopenpower-occ-control-94df8c9015798764d40665bb363bdbf27510f285.tar.gz
openpower-occ-control-94df8c9015798764d40665bb363bdbf27510f285.zip
clang-format: Update to match docs repo
Update the .clang-format file and run clang-format-6.0. This .clang-format matches the example one in https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#clang-formatting Change-Id: Id6760866dedbaeafd83ea8ef2e0303e30b8955aa Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'utils.cpp')
-rw-r--r--utils.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/utils.cpp b/utils.cpp
index d9a98ee..c68913d 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -1,6 +1,6 @@
-#include <string>
-#include <sdbusplus/bus.hpp>
#include <phosphor-logging/elog-errors.hpp>
+#include <sdbusplus/bus.hpp>
+#include <string>
#include <xyz/openbmc_project/Common/error.hpp>
namespace open_power
{
@@ -9,17 +9,16 @@ namespace occ
// For throwing exceptions
using namespace phosphor::logging;
-using InternalFailure = sdbusplus::xyz::openbmc_project::Common::
- Error::InternalFailure;
+using InternalFailure =
+ sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
-std::string getService(sdbusplus::bus::bus& bus,
- const std::string& path,
+std::string getService(sdbusplus::bus::bus& bus, const std::string& path,
const std::string& intf)
{
- auto mapperCall = bus.new_method_call("xyz.openbmc_project.ObjectMapper",
- "/xyz/openbmc_project/object_mapper",
- "xyz.openbmc_project.ObjectMapper",
- "GetObject");
+ auto mapperCall =
+ bus.new_method_call("xyz.openbmc_project.ObjectMapper",
+ "/xyz/openbmc_project/object_mapper",
+ "xyz.openbmc_project.ObjectMapper", "GetObject");
mapperCall.append(path);
mapperCall.append(std::vector<std::string>({intf}));
@@ -29,8 +28,8 @@ std::string getService(sdbusplus::bus::bus& bus,
if (mapperResponseMsg.is_method_error())
{
log<level::ERR>("ERROR in getting service",
- entry("PATH=%s",path.c_str()),
- entry("INTERFACE=%s",intf.c_str()));
+ entry("PATH=%s", path.c_str()),
+ entry("INTERFACE=%s", intf.c_str()));
elog<InternalFailure>();
}
@@ -41,8 +40,8 @@ std::string getService(sdbusplus::bus::bus& bus,
if (mapperResponse.begin() == mapperResponse.end())
{
log<level::ERR>("ERROR reading mapper response",
- entry("PATH=%s",path.c_str()),
- entry("INTERFACE=%s",intf.c_str()));
+ entry("PATH=%s", path.c_str()),
+ entry("INTERFACE=%s", intf.c_str()));
elog<InternalFailure>();
}
OpenPOWER on IntegriCloud