Enable clang code format
Change-Id: Ib640ef7cea99ff505965182ec9900a2d53a8986e
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/core_manager.hpp b/core_manager.hpp
index 1a79982..18b7125 100644
--- a/core_manager.hpp
+++ b/core_manager.hpp
@@ -1,10 +1,11 @@
#pragma once
-#include <map>
+#include "config.h"
#include "dump_utils.hpp"
#include "watch.hpp"
-#include "config.h"
+
+#include <map>
namespace phosphor
{
@@ -20,9 +21,9 @@
* Refer openbmc/issues/#2287 for more details.
*/
#ifdef UBI_CORE_FILE_WORKAROUND
- static constexpr auto coreFileEvent = IN_CREATE;
+static constexpr auto coreFileEvent = IN_CREATE;
#else
- static constexpr auto coreFileEvent = IN_CLOSE_WRITE;
+static constexpr auto coreFileEvent = IN_CLOSE_WRITE;
#endif
/** @class Manager
@@ -30,50 +31,45 @@
*/
class Manager
{
- public:
- Manager() = delete;
- Manager(const Manager&) = default;
- Manager& operator=(const Manager&) = delete;
- Manager(Manager&&) = delete;
- Manager& operator=(Manager&&) = delete;
- virtual ~Manager() = default;
+ public:
+ Manager() = delete;
+ Manager(const Manager&) = default;
+ Manager& operator=(const Manager&) = delete;
+ Manager(Manager&&) = delete;
+ Manager& operator=(Manager&&) = delete;
+ virtual ~Manager() = default;
- /** @brief Constructor to create core watch object.
- * @param[in] event - Dump manager sd_event loop.
- */
- Manager(const EventPtr& event) :
- eventLoop(event.get()),
- coreWatch(eventLoop,
- IN_NONBLOCK,
- coreFileEvent,
- EPOLLIN,
- CORE_FILE_DIR,
- std::bind(
- std::mem_fn(
- &phosphor::dump::core::Manager::watchCallback),
- this, std::placeholders::_1))
- {}
+ /** @brief Constructor to create core watch object.
+ * @param[in] event - Dump manager sd_event loop.
+ */
+ Manager(const EventPtr& event) :
+ eventLoop(event.get()),
+ coreWatch(eventLoop, IN_NONBLOCK, coreFileEvent, EPOLLIN, CORE_FILE_DIR,
+ std::bind(std::mem_fn(
+ &phosphor::dump::core::Manager::watchCallback),
+ this, std::placeholders::_1))
+ {
+ }
- private:
- /** @brief Helper function for initiating dump request using
- * D-bus internal create interface.
- * @param [in] files - Core files list
- */
- void createHelper(const std::vector<std::string>& files);
+ private:
+ /** @brief Helper function for initiating dump request using
+ * D-bus internal create interface.
+ * @param [in] files - Core files list
+ */
+ void createHelper(const std::vector<std::string>& files);
+ /** @brief Implementation of core watch call back
+ * @param [in] fileInfo - map of file info path:event
+ */
+ void watchCallback(const UserMap& fileInfo);
- /** @brief Implementation of core watch call back
- * @param [in] fileInfo - map of file info path:event
- */
- void watchCallback(const UserMap& fileInfo);
+ /** @brief sdbusplus Dump event loop */
+ EventPtr eventLoop;
- /** @brief sdbusplus Dump event loop */
- EventPtr eventLoop;
-
- /** @brief Core watch object */
- Watch coreWatch;
+ /** @brief Core watch object */
+ Watch coreWatch;
};
-} // namepsace core
+} // namespace core
} // namespace dump
} // namespace phosphor