build: Migrate to meson and add clang-format
Removed the Cmake files and cleanup formatting errors.
Change-Id: I787041507d3ff6afc6b4a3af3930e8d8363c9570
Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/include/bioscommands.hpp b/include/bioscommands.hpp
index 6a705a5..2e915bb 100644
--- a/include/bioscommands.hpp
+++ b/include/bioscommands.hpp
@@ -1,3 +1,4 @@
+// clang-format off
/********************************************************************************
* HON HAI Precision IND.Co., LTD. *
* Personal Computer & Enterprise Product Business Group *
@@ -13,12 +14,17 @@
* permission of FOXCONN/CESBG/CABG/SRD. *
* *
********************************************************************************/
+// clang-format on
#pragma once
-#define BOOT_COUNT_READ 0x00
-#define BOOT_COUNT_INCREMENT 0x01
-#define BOOT_COUNT_CLEAR 0x02
-#define BOOT_COUNT_SET 0x03
+
+#include <cstddef>
+#include <string>
+
+#define BOOT_COUNT_READ 0x00
+#define BOOT_COUNT_INCREMENT 0x01
+#define BOOT_COUNT_CLEAR 0x02
+#define BOOT_COUNT_SET 0x03
#define FII_CMD_BIOS_BOOT_COUNT 0x71
#define OPERATION_BYTE_LENGTH 1
#define SET_BYTE_LENGTH 5
diff --git a/include/file_handling.hpp b/include/file_handling.hpp
index bb4f703..94f6d5a 100644
--- a/include/file_handling.hpp
+++ b/include/file_handling.hpp
@@ -1,3 +1,4 @@
+// clang-format off
/********************************************************************************
* HON HAI Precision IND.Co., LTD. *
* Personal Computer & Enterprise Product Business Group *
@@ -13,8 +14,11 @@
* permission of FOXCONN/CESBG/CABG/SRD. *
* *
********************************************************************************/
+// clang-format on
#include <unistd.h>
+#include <system_error>
+
std::system_error errnoException(const std::string& message);
int sysopen(const std::string& path);
@@ -23,7 +27,6 @@
void lseeker(int fd_, size_t offset);
-void readBin(int fd_, size_t offset, void *ptr, size_t size);
+void readBin(int fd_, size_t offset, void* ptr, size_t size);
-void writeBin(int fd_, size_t offset, void *ptr, size_t size);
-
+void writeBin(int fd_, size_t offset, void* ptr, size_t size);
diff --git a/include/systemcommands.hpp b/include/systemcommands.hpp
index 2a67a0b..e263c92 100644
--- a/include/systemcommands.hpp
+++ b/include/systemcommands.hpp
@@ -1,3 +1,4 @@
+// clang-format off
/********************************************************************************
* HON HAI Precision IND.Co., LTD. *
* Personal Computer & Enterprise Product Business Group *
@@ -13,7 +14,7 @@
* permission of FOXCONN/CESBG/CABG/SRD. *
* *
********************************************************************************/
-
+// clang-format on
#pragma once
#define PCIEINFO_COMMAND "i2cget -y -a -f 26 0x76 0x01 i 2"