summaryrefslogtreecommitdiff
path: root/host
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-08-29 13:58:52 +0800
committerCommit Bot <commit-bot@chromium.org>2019-09-23 17:54:12 +0000
commitffd42a82201423d7b82cffd755baf3d5cd5c7efc (patch)
tree744299c8a134b963e8ac117c1d62a4a5d1b51f73 /host
parent56b70c403ea47f7da67c69b72c84d591b8f3ce21 (diff)
downloadvboot-ffd42a82201423d7b82cffd755baf3d5cd5c7efc.tar.gz
vboot: fix up some more includes
Should have no extra line breaks in between local includes, and should be sorted alphabetically. BUG=b:124141368 TEST=make clean && make runtests BRANCH=none Change-Id: I83c25d30d7376712857314965a7d93f57190aa3f Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1776281 Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'host')
-rw-r--r--host/arch/arm/lib/crossystem_arch.c6
-rw-r--r--host/arch/mips/lib/crossystem_arch.c6
-rw-r--r--host/arch/x86/lib/crossystem_arch.c3
-rw-r--r--host/lib/crossystem.c8
-rw-r--r--host/lib/extract_vmlinuz.c1
-rw-r--r--host/lib/file_keys.c3
-rw-r--r--host/lib/host_common.c2
-rw-r--r--host/lib/host_key.c2
-rw-r--r--host/lib/host_key2.c4
-rw-r--r--host/lib/host_keyblock.c2
-rw-r--r--host/lib/host_signature.c3
-rw-r--r--host/lib/include/util_misc.h1
-rw-r--r--host/lib/signature_digest.c3
-rw-r--r--host/lib/util_misc.c5
-rw-r--r--host/lib21/host_fw_preamble.c2
-rw-r--r--host/lib21/host_key.c4
-rw-r--r--host/lib21/host_keyblock.c4
-rw-r--r--host/lib21/host_misc.c4
-rw-r--r--host/lib21/host_signature.c6
19 files changed, 31 insertions, 38 deletions
diff --git a/host/arch/arm/lib/crossystem_arch.c b/host/arch/arm/lib/crossystem_arch.c
index 8f469653..75ed4ef9 100644
--- a/host/arch/arm/lib/crossystem_arch.c
+++ b/host/arch/arm/lib/crossystem_arch.c
@@ -22,11 +22,11 @@
#include <unistd.h>
#include <netinet/in.h>
-#include "vboot_common.h"
-#include "host_common.h"
-#include "crossystem.h"
#include "crossystem_arch.h"
+#include "crossystem.h"
#include "crossystem_vbnv.h"
+#include "host_common.h"
+#include "vboot_common.h"
/* Base name for firmware FDT files */
#define FDT_BASE_PATH "/proc/device-tree/firmware/chromeos"
diff --git a/host/arch/mips/lib/crossystem_arch.c b/host/arch/mips/lib/crossystem_arch.c
index 5c92c9d5..ed4fb064 100644
--- a/host/arch/mips/lib/crossystem_arch.c
+++ b/host/arch/mips/lib/crossystem_arch.c
@@ -5,10 +5,10 @@
#include <string.h>
-#include "vboot_common.h"
-#include "host_common.h"
-#include "crossystem.h"
#include "crossystem_arch.h"
+#include "crossystem.h"
+#include "host_common.h"
+#include "vboot_common.h"
/* TODO: Currently these are stub implementations providing reasonable defaults
* wherever possible. They will need real implementation as part of of MIPS
diff --git a/host/arch/x86/lib/crossystem_arch.c b/host/arch/x86/lib/crossystem_arch.c
index 6b55802b..25d7a325 100644
--- a/host/arch/x86/lib/crossystem_arch.c
+++ b/host/arch/x86/lib/crossystem_arch.c
@@ -16,15 +16,14 @@
#include <sys/types.h>
#include <unistd.h>
-#include "crossystem.h"
#include "crossystem_arch.h"
+#include "crossystem.h"
#include "crossystem_vbnv.h"
#include "host_common.h"
#include "utility.h"
#include "vboot_common.h"
#include "vboot_struct.h"
-
/* ACPI constants from Chrome OS Main Processor Firmware Spec */
/* Boot reasons from BINF.0, from early H2C firmware */
/* Unknown */
diff --git a/host/lib/crossystem.c b/host/lib/crossystem.c
index 3db2ecb7..126b228e 100644
--- a/host/lib/crossystem.c
+++ b/host/lib/crossystem.c
@@ -16,16 +16,14 @@
#include <fcntl.h>
#include <unistd.h>
-#include "2sysincludes.h"
#include "2api.h"
#include "2common.h"
#include "2nvstorage.h"
-
-#include "host_common.h"
-
-#include "crossystem.h"
+#include "2sysincludes.h"
#include "crossystem_arch.h"
+#include "crossystem.h"
#include "crossystem_vbnv.h"
+#include "host_common.h"
#include "utility.h"
#include "vboot_struct.h"
diff --git a/host/lib/extract_vmlinuz.c b/host/lib/extract_vmlinuz.c
index 58fd7d7f..93fabaac 100644
--- a/host/lib/extract_vmlinuz.c
+++ b/host/lib/extract_vmlinuz.c
@@ -14,7 +14,6 @@
#include "vboot_host.h"
#include "vboot_struct.h"
-
int ExtractVmlinuz(void *kpart_data, size_t kpart_size,
void **vmlinuz_out, size_t *vmlinuz_size) {
size_t now = 0;
diff --git a/host/lib/file_keys.c b/host/lib/file_keys.c
index e47091de..7ae71802 100644
--- a/host/lib/file_keys.c
+++ b/host/lib/file_keys.c
@@ -13,10 +13,9 @@
#include <sys/types.h>
#include <unistd.h>
-#include "2sysincludes.h"
-
#include "2common.h"
#include "2sha.h"
+#include "2sysincludes.h"
#include "file_keys.h"
#include "host_common.h"
#include "signature_digest.h"
diff --git a/host/lib/host_common.c b/host/lib/host_common.c
index c3ba044e..414050f4 100644
--- a/host/lib/host_common.c
+++ b/host/lib/host_common.c
@@ -7,9 +7,9 @@
#include <string.h>
-#include "2sysincludes.h"
#include "2common.h"
#include "2rsa.h"
+#include "2sysincludes.h"
#include "host_common.h"
#include "host_key2.h"
#include "utility.h"
diff --git a/host/lib/host_key.c b/host/lib/host_key.c
index 52845c03..8651f4f0 100644
--- a/host/lib/host_key.c
+++ b/host/lib/host_key.c
@@ -13,10 +13,10 @@
#include <stdlib.h>
#include <unistd.h>
-#include "2sysincludes.h"
#include "2common.h"
#include "2rsa.h"
#include "2sha.h"
+#include "2sysincludes.h"
#include "host_common.h"
#include "host_misc.h"
#include "vb2_common.h"
diff --git a/host/lib/host_key2.c b/host/lib/host_key2.c
index b76ac2ae..072eb5a2 100644
--- a/host/lib/host_key2.c
+++ b/host/lib/host_key2.c
@@ -13,13 +13,13 @@
#include <stdlib.h>
#include <unistd.h>
-#include "2sysincludes.h"
#include "2common.h"
#include "2rsa.h"
#include "2sha.h"
+#include "2sysincludes.h"
#include "host_common.h"
-#include "host_key.h"
#include "host_key2.h"
+#include "host_key.h"
#include "host_misc.h"
#include "vb2_common.h"
#include "vboot_common.h"
diff --git a/host/lib/host_keyblock.c b/host/lib/host_keyblock.c
index 08f2b768..be1aa085 100644
--- a/host/lib/host_keyblock.c
+++ b/host/lib/host_keyblock.c
@@ -14,9 +14,9 @@
#include "2rsa.h"
#include "2sha.h"
#include "host_common.h"
-#include "host_key.h"
#include "host_key2.h"
#include "host_keyblock.h"
+#include "host_key.h"
#include "vb2_common.h"
#include "vb2_struct.h"
#include "vboot_common.h"
diff --git a/host/lib/host_signature.c b/host/lib/host_signature.c
index cfa40d10..0c5900ec 100644
--- a/host/lib/host_signature.c
+++ b/host/lib/host_signature.c
@@ -15,11 +15,10 @@
#include <sys/wait.h>
#include <unistd.h>
-#include "2sysincludes.h"
-
#include "2common.h"
#include "2rsa.h"
#include "2sha.h"
+#include "2sysincludes.h"
#include "host_common.h"
#include "host_signature2.h"
#include "vb2_common.h"
diff --git a/host/lib/include/util_misc.h b/host/lib/include/util_misc.h
index cd26b30a..1f92af95 100644
--- a/host/lib/include/util_misc.h
+++ b/host/lib/include/util_misc.h
@@ -10,6 +10,7 @@
#include "host_key.h"
#include "vboot_struct.h"
+
struct rsa_st;
struct vb2_packed_key;
struct vb2_private_key;
diff --git a/host/lib/signature_digest.c b/host/lib/signature_digest.c
index a154ed4b..b480798d 100644
--- a/host/lib/signature_digest.c
+++ b/host/lib/signature_digest.c
@@ -9,11 +9,10 @@
#include <stdlib.h>
#include <unistd.h>
-#include "2sysincludes.h"
-
#include "2common.h"
#include "2rsa.h"
#include "2sha.h"
+#include "2sysincludes.h"
#include "host_common.h"
#include "host_signature2.h"
#include "signature_digest.h"
diff --git a/host/lib/util_misc.c b/host/lib/util_misc.c
index d2e694d0..535ede28 100644
--- a/host/lib/util_misc.c
+++ b/host/lib/util_misc.c
@@ -13,15 +13,14 @@
#include <string.h>
#include <unistd.h>
-#include "2sysincludes.h"
-
#include "2common.h"
#include "2sha.h"
+#include "2sysincludes.h"
#include "host_common.h"
+#include "host_key2.h"
#include "openssl_compat.h"
#include "util_misc.h"
#include "vb2_common.h"
-#include "host_key2.h"
#include "vboot_common.h"
const char *packed_key_sha1_string(const struct vb2_packed_key *key)
diff --git a/host/lib21/host_fw_preamble.c b/host/lib21/host_fw_preamble.c
index 7220b32e..ea2da988 100644
--- a/host/lib21/host_fw_preamble.c
+++ b/host/lib21/host_fw_preamble.c
@@ -5,9 +5,9 @@
* Host functions for keyblocks
*/
-#include "2sysincludes.h"
#include "2common.h"
#include "2rsa.h"
+#include "2sysincludes.h"
#include "host_common.h"
#include "host_fw_preamble2.h"
#include "host_key2.h"
diff --git a/host/lib21/host_key.c b/host/lib21/host_key.c
index 1154bec9..34e5a633 100644
--- a/host/lib21/host_key.c
+++ b/host/lib21/host_key.c
@@ -9,15 +9,15 @@
#include <openssl/pem.h>
-#include "2sysincludes.h"
#include "2common.h"
#include "2rsa.h"
#include "2sha.h"
-#include "vb21_common.h"
+#include "2sysincludes.h"
#include "host_common.h"
#include "host_key2.h"
#include "host_misc.h"
#include "openssl_compat.h"
+#include "vb21_common.h"
const struct vb2_text_vs_enum vb2_text_vs_sig[] = {
{"RSA1024", VB2_SIG_RSA1024},
diff --git a/host/lib21/host_keyblock.c b/host/lib21/host_keyblock.c
index 9c5959a4..d52afe23 100644
--- a/host/lib21/host_keyblock.c
+++ b/host/lib21/host_keyblock.c
@@ -5,15 +5,15 @@
* Host functions for keyblocks
*/
-#include "2sysincludes.h"
#include "2common.h"
#include "2rsa.h"
-#include "vb21_common.h"
+#include "2sysincludes.h"
#include "host_common.h"
#include "host_key2.h"
#include "host_keyblock2.h"
#include "host_misc.h"
#include "host_signature2.h"
+#include "vb21_common.h"
vb2_error_t vb21_keyblock_create(struct vb21_keyblock **kb_ptr,
const struct vb2_public_key *data_key,
diff --git a/host/lib21/host_misc.c b/host/lib21/host_misc.c
index 9d375681..71a77c5d 100644
--- a/host/lib21/host_misc.c
+++ b/host/lib21/host_misc.c
@@ -10,12 +10,12 @@
#include <string.h>
#include <unistd.h>
-#include "2sysincludes.h"
#include "2common.h"
#include "2sha.h"
-#include "vb21_common.h"
+#include "2sysincludes.h"
#include "host_common.h"
#include "host_misc2.h"
+#include "vb21_common.h"
vb2_error_t vb2_read_file(const char *filename, uint8_t **data_ptr,
uint32_t *size_ptr)
diff --git a/host/lib21/host_signature.c b/host/lib21/host_signature.c
index 51320e7b..e4dead01 100644
--- a/host/lib21/host_signature.c
+++ b/host/lib21/host_signature.c
@@ -7,15 +7,15 @@
#include <openssl/rsa.h>
-#include "2sysincludes.h"
#include "2common.h"
#include "2rsa.h"
#include "2sha.h"
-#include "vb21_common.h"
+#include "2sysincludes.h"
#include "host_common.h"
#include "host_key2.h"
-#include "host_signature2.h"
#include "host_misc.h"
+#include "host_signature2.h"
+#include "vb21_common.h"
vb2_error_t vb2_digest_info(enum vb2_hash_algorithm hash_alg,
const uint8_t **buf_ptr, uint32_t *size_ptr)