summaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfstool.c
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2015-08-11 14:54:24 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-08-13 16:08:15 +0200
commite60b55a570a3bb9bf75bd344ef41460454abaef2 (patch)
treee791c4d59f88b997ea4c358d1165b6f6a9ae48e3 /util/cbfstool/cbfstool.c
parent4e54bf93345332fc866b6b8b798a99248edb0698 (diff)
downloadcoreboot-e60b55a570a3bb9bf75bd344ef41460454abaef2.tar.xz
cbfstool: allow passing a precalculated header size into cbfs_add_entry()
This is in preparation of creating the cbfs_file header much earlier in the process. For now, size is enough because lots of things need to move before it makes sense to deal with cbfs_file at a higher level. Change-Id: I47589247c3011cb828170eaa10ef4a1e0f85ab84 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: http://review.coreboot.org/11213 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'util/cbfstool/cbfstool.c')
-rw-r--r--util/cbfstool/cbfstool.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index 6a89476da7..80e3895036 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -150,8 +150,8 @@ static int cbfs_add_integer_component(const char *name,
offset = convert_to_from_top_aligned(param.image_region,
-offset);
- if (cbfs_add_entry(&image, &buffer, name, CBFS_COMPONENT_RAW, offset) !=
- 0) {
+ if (cbfs_add_entry(&image, &buffer, name, CBFS_COMPONENT_RAW,
+ offset, 0) != 0) {
ERROR("Failed to add %llu into ROM image as '%s'.\n",
(long long unsigned)u64val, name);
goto done;
@@ -211,7 +211,7 @@ static int cbfs_add_component(const char *filename,
offset = convert_to_from_top_aligned(param.image_region,
-offset);
- if (cbfs_add_entry(&image, &buffer, name, type, offset) != 0) {
+ if (cbfs_add_entry(&image, &buffer, name, type, offset, 0) != 0) {
ERROR("Failed to add '%s' into ROM image.\n", filename);
buffer_delete(&buffer);
return 1;