Add clang-format
Refer:https://github.com/openbmc/docs/blob/ac5d544553934f8083c61c5986a1420261bc8a4c/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I931503febf4e17af5c328a6496e499992bc4e381
diff --git a/ikvm_input.cpp b/ikvm_input.cpp
index cbbfdc4..e9bd151 100644
--- a/ikvm_input.cpp
+++ b/ikvm_input.cpp
@@ -1,6 +1,7 @@
#include "ikvm_input.hpp"
#include "ikvm_server.hpp"
+#include "scancodes.hpp"
#include <err.h>
#include <errno.h>
@@ -14,8 +15,6 @@
#include <phosphor-logging/log.hpp>
#include <xyz/openbmc_project/Common/File/error.hpp>
-#include "scancodes.hpp"
-
namespace fs = std::filesystem;
namespace ikvm
@@ -78,8 +77,8 @@
if (!keyboardPath.empty())
{
- keyboardFd = open(keyboardPath.c_str(),
- O_RDWR | O_CLOEXEC | O_NONBLOCK);
+ keyboardFd =
+ open(keyboardPath.c_str(), O_RDWR | O_CLOEXEC | O_NONBLOCK);
if (keyboardFd < 0)
{
log<level::ERR>("Failed to open input device",
@@ -228,7 +227,8 @@
else
{
input->pointerReport[0] = ((buttonMask & 0x4) >> 1) |
- ((buttonMask & 0x2) << 1) | (buttonMask & 0x1);
+ ((buttonMask & 0x2) << 1) |
+ (buttonMask & 0x1);
input->pointerReport[5] = 0;
}
@@ -502,7 +502,7 @@
return scancode;
}
-bool Input::writeKeyboard(const uint8_t *report)
+bool Input::writeKeyboard(const uint8_t* report)
{
std::unique_lock<std::mutex> lk(keyMutex);
uint retryCount = HID_REPORT_RETRY_MAX;
@@ -534,7 +534,7 @@
return false;
}
-void Input::writePointer(const uint8_t *report)
+void Input::writePointer(const uint8_t* report)
{
std::unique_lock<std::mutex> lk(ptrMutex);
uint retryCount = HID_REPORT_RETRY_MAX;