summaryrefslogtreecommitdiff
path: root/utility/load_kernel_test.c
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-04-25 18:31:14 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-05-17 18:36:48 -0700
commit27e3e9fcba98dba576322273a34bd0cbbb639e81 (patch)
tree208694afb44812fd666551682bffe95c96856d48 /utility/load_kernel_test.c
parent719968c47a6220b3e660e4f72cbc2a56750eec00 (diff)
downloadvboot-27e3e9fcba98dba576322273a34bd0cbbb639e81.tar.gz
vboot: deprecate v1 GoogleBinaryBlockHeader struct
Deprecate internal usage of GoogleBinaryBlockHeader struct in favour of vb2_gbb_header struct. Keep the v1 struct around until we remove references in other repos. BUG=b:124141368, chromium:954774 TEST=make clean && make runtests BRANCH=none Change-Id: I396d2e624bd5dcac9c461cc86e8175e8f7692d26 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/1583826 Commit-Ready: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'utility/load_kernel_test.c')
-rw-r--r--utility/load_kernel_test.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/utility/load_kernel_test.c b/utility/load_kernel_test.c
index 6606c425..331e57ad 100644
--- a/utility/load_kernel_test.c
+++ b/utility/load_kernel_test.c
@@ -17,7 +17,6 @@
#include "2sysincludes.h"
#include "2api.h"
#include "2misc.h"
-#include "gbb_header.h"
#include "host_common.h"
#include "load_kernel_fw.h"
#include "rollback_index.h"
@@ -86,7 +85,7 @@ int main(int argc, char* argv[]) {
uint64_t key_size;
uint8_t* key_blob = NULL;
VbSharedDataHeader* shared;
- GoogleBinaryBlockHeader* gbb;
+ struct vb2_gbb_header* gbb;
VbError_t rv;
int c, argsleft;
int errorcnt = 0;
@@ -160,13 +159,13 @@ int main(int argc, char* argv[]) {
}
/* Initialize the GBB */
- uint32_t gbb_size = sizeof(GoogleBinaryBlockHeader) + key_size;
- gbb = (GoogleBinaryBlockHeader*)malloc(gbb_size);
+ uint32_t gbb_size = sizeof(struct vb2_gbb_header) + key_size;
+ gbb = (struct vb2_gbb_header*)malloc(gbb_size);
memset(gbb, 0, gbb_size);
- memcpy(gbb->signature, GBB_SIGNATURE, GBB_SIGNATURE_SIZE);
- gbb->major_version = GBB_MAJOR_VER;
- gbb->minor_version = GBB_MINOR_VER;
- gbb->header_size = sizeof(GoogleBinaryBlockHeader);
+ memcpy(gbb->signature, VB2_GBB_SIGNATURE, VB2_GBB_SIGNATURE_SIZE);
+ gbb->major_version = VB2_GBB_MAJOR_VER;
+ gbb->minor_version = VB2_GBB_MINOR_VER;
+ gbb->header_size = sizeof(struct vb2_gbb_header);
/* Fill in the given key, if any, for both root and recovery */
if (key_blob) {
gbb->rootkey_offset = gbb->header_size;