format: add project-wide clang-format file
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ibfc8d8386e77178edb3ca36badc07d9ad13abd51
diff --git a/src/kunlun_oem.cpp b/src/kunlun_oem.cpp
index 83bdb19..22d1906 100644
--- a/src/kunlun_oem.cpp
+++ b/src/kunlun_oem.cpp
@@ -1,10 +1,12 @@
-#include <filesystem>
-#include <fstream>
+#include "config.h"
+
+#include "kunlun_oem.hpp"
+
#include <ipmid/api.hpp>
#include <phosphor-logging/log.hpp>
-#include "config.h"
-#include "kunlun_oem.hpp"
+#include <filesystem>
+#include <fstream>
namespace ipmi
{
@@ -14,11 +16,12 @@
// save cpu infomation from bios to file
// index[in]: cpu index
// info[in]: data saving to file
-static int saveInfoToFile(uint8_t index, std::vector<char> &info)
+static int saveInfoToFile(uint8_t index, std::vector<char>& info)
{
char infoPath[PATH_MAX];
- std::snprintf(infoPath, sizeof(infoPath), IPMI_BIOSDATA_DIR"/cpu%02x", index);
+ std::snprintf(infoPath, sizeof(infoPath), IPMI_BIOSDATA_DIR "/cpu%02x",
+ index);
if (!(std::filesystem::exists(IPMI_BIOSDATA_DIR)))
{
@@ -36,11 +39,12 @@
// load cpu infomation from file
// index[in]: cpu index
// info[out]: data loading from file
-static int loadInfoFromFile(uint8_t index, std::vector<char> &info)
+static int loadInfoFromFile(uint8_t index, std::vector<char>& info)
{
char infoPath[PATH_MAX];
- std::snprintf(infoPath, sizeof(infoPath), IPMI_BIOSDATA_DIR"/cpu%02x", index);
+ std::snprintf(infoPath, sizeof(infoPath), IPMI_BIOSDATA_DIR "/cpu%02x",
+ index);
if (!(std::filesystem::exists(infoPath)))
{
diff --git a/src/kunlun_oem.hpp b/src/kunlun_oem.hpp
index acd62db..de477b9 100644
--- a/src/kunlun_oem.hpp
+++ b/src/kunlun_oem.hpp
@@ -1,20 +1,21 @@
#pragma once
-#include <cstdint>
#include <ipmid/api.hpp>
+#include <cstdint>
+
namespace ipmi
{
using NetFn = uint8_t;
-using Cmd = uint8_t;
-using Cc = uint8_t;
+using Cmd = uint8_t;
+using Cc = uint8_t;
constexpr NetFn netfnKunlunOem = netFnOemSix;
namespace cmd
{
- constexpr Cmd cmdSetCpuInfo = 0x0;
- constexpr Cmd cmdGetCpuInfo = 0x1;
+constexpr Cmd cmdSetCpuInfo = 0x0;
+constexpr Cmd cmdGetCpuInfo = 0x1;
} // namespace cmd
RspType<> setCpuInfo(uint8_t index, std::vector<char> info);