From 1f0ce3a80ed16e7d3a0737720ff6276e4a5893e5 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Fri, 18 Nov 2016 09:05:18 -0600 Subject: commonlib/include: remove NEED_VB20_INTERNALS vboot_handoff.c is the only place that needs the vb2 internals. Provide it in the one place it is actually required instead of pulling in the headers unnecessarily in common code. There is, however, still a need to get the vb2 hashing types for a function declaration. Change-Id: I038fda68b1cd05fa2e66135158e5e2d18567563a Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/17475 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/commonlib/include/commonlib/cbfs.h | 2 -- src/vboot/vboot_handoff.c | 13 +++++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/commonlib/include/commonlib/cbfs.h b/src/commonlib/include/commonlib/cbfs.h index 5e511a7aea..163bef270a 100644 --- a/src/commonlib/include/commonlib/cbfs.h +++ b/src/commonlib/include/commonlib/cbfs.h @@ -18,8 +18,6 @@ #include #include -/* TODO: remove me! This is for vboot_handoff.c's benefit. */ -#define NEED_VB20_INTERNALS #include /* Object representing cbfs files. */ diff --git a/src/vboot/vboot_handoff.c b/src/vboot/vboot_handoff.c index b732b3aaa8..2533a1d415 100644 --- a/src/vboot/vboot_handoff.c +++ b/src/vboot/vboot_handoff.c @@ -13,11 +13,18 @@ * GNU General Public License for more details. */ +/* This needs to be pulled in first so that the handoff code below and + * peek into the vb2 data structures. Additionally, vboot doesn't currently + * include what it uses in its own headers. Provide the types it's after. + * TODO: fix this necessity. */ +#define NEED_VB20_INTERNALS +#include +#include +#include + #include #include #include -#include -#include #include #include #include @@ -26,8 +33,6 @@ #include #include #include -#define NEED_VB20_INTERNALS /* TODO: remove me! */ -#include #include #include #include -- cgit v1.2.3