summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-08-30 14:31:46 +0800
committerCommit Bot <commit-bot@chromium.org>2019-08-31 20:49:18 +0000
commit479f2d6927a9eb4995b4a1d2185fa809934b63ad (patch)
tree8ac904c0974aadec6535dfb940437f80aa2d00a9
parentfbde3aa0af045021c2bfd315ad59f10aab2543fc (diff)
downloadvboot-479f2d6927a9eb4995b4a1d2185fa809934b63ad.tar.gz
vboot/secdata: fix 2secdata.h includes
Get rid of vb2_context forward declaration and vb2_error_t redefinition from 2secdata.h, and properly include 2api.h instead. Remove 2secdata.h from 2api.h (should not be publicly accessible), and add 2secdata.h include to appropriate files. BUG=b:124141368, chromium:972956 TEST=make clean && make runtests BRANCH=none Change-Id: I15570488fdabfcd9a178a0cedc7868b8c23720e9 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1776285 Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r--firmware/2lib/include/2api.h1
-rw-r--r--firmware/2lib/include/2secdata.h4
-rw-r--r--firmware/lib/vboot_kernel.c1
-rw-r--r--firmware/lib/vboot_ui.c1
-rw-r--r--firmware/lib/vboot_ui_menu.c1
-rw-r--r--tests/vboot_api_devmode_tests.c1
-rw-r--r--tests/vboot_api_kernel2_tests.c1
-rw-r--r--tests/vboot_detach_menu_tests.c1
8 files changed, 7 insertions, 4 deletions
diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h
index 9ca01993..8a127317 100644
--- a/firmware/2lib/include/2api.h
+++ b/firmware/2lib/include/2api.h
@@ -26,7 +26,6 @@
#include "2id.h"
#include "2recovery_reasons.h"
#include "2return_codes.h"
-#include "2secdata.h"
/* TODO(chromium:972956): Remove once coreboot is using updated names */
#define secdata secdata_firmware
diff --git a/firmware/2lib/include/2secdata.h b/firmware/2lib/include/2secdata.h
index 6931278c..0bbce4f3 100644
--- a/firmware/2lib/include/2secdata.h
+++ b/firmware/2lib/include/2secdata.h
@@ -8,9 +8,7 @@
#ifndef VBOOT_REFERENCE_2SECDATA_H_
#define VBOOT_REFERENCE_2SECDATA_H_
-/* Avoid circular dependency with 2api.h */
-struct vb2_context;
-typedef uint32_t vb2_error_t;
+#include "2api.h"
/*****************************************************************************/
/* Firmware version space */
diff --git a/firmware/lib/vboot_kernel.c b/firmware/lib/vboot_kernel.c
index 1d54ef6f..e2ca910f 100644
--- a/firmware/lib/vboot_kernel.c
+++ b/firmware/lib/vboot_kernel.c
@@ -11,6 +11,7 @@
#include "2nvstorage.h"
#include "2rsa.h"
#include "2sha.h"
+#include "2secdata.h"
#include "2sysincludes.h"
#include "cgptlib.h"
#include "cgptlib_internal.h"
diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c
index ec0b812c..22035952 100644
--- a/firmware/lib/vboot_ui.c
+++ b/firmware/lib/vboot_ui.c
@@ -10,6 +10,7 @@
#include "2misc.h"
#include "2nvstorage.h"
#include "2rsa.h"
+#include "2secdata.h"
#include "ec_sync.h"
#include "load_kernel_fw.h"
#include "rollback_index.h"
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c
index 1b1db811..24b7de8f 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_menu.c
@@ -9,6 +9,7 @@
#include "2misc.h"
#include "2nvstorage.h"
#include "2rsa.h"
+#include "2secdata.h"
#include "2sysincludes.h"
#include "ec_sync.h"
#include "load_kernel_fw.h"
diff --git a/tests/vboot_api_devmode_tests.c b/tests/vboot_api_devmode_tests.c
index 7077b1ed..011a3616 100644
--- a/tests/vboot_api_devmode_tests.c
+++ b/tests/vboot_api_devmode_tests.c
@@ -14,6 +14,7 @@
#include "2common.h"
#include "2misc.h"
#include "2nvstorage.h"
+#include "2secdata.h"
#include "crc32.h"
#include "host_common.h"
#include "load_kernel_fw.h"
diff --git a/tests/vboot_api_kernel2_tests.c b/tests/vboot_api_kernel2_tests.c
index 1791dc71..c1f4f04e 100644
--- a/tests/vboot_api_kernel2_tests.c
+++ b/tests/vboot_api_kernel2_tests.c
@@ -12,6 +12,7 @@
#include "2common.h"
#include "2misc.h"
#include "2nvstorage.h"
+#include "2secdata.h"
#include "host_common.h"
#include "load_kernel_fw.h"
#include "rollback_index.h"
diff --git a/tests/vboot_detach_menu_tests.c b/tests/vboot_detach_menu_tests.c
index 14e0aa30..39bf29dc 100644
--- a/tests/vboot_detach_menu_tests.c
+++ b/tests/vboot_detach_menu_tests.c
@@ -12,6 +12,7 @@
#include "2common.h"
#include "2misc.h"
#include "2nvstorage.h"
+#include "2secdata.h"
#include "host_common.h"
#include "load_kernel_fw.h"
#include "rollback_index.h"