summaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfstool.c
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2015-08-25 22:27:57 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-08-27 15:07:00 +0000
commitf5252f378bbe3227406711f317fb4e1a41610e33 (patch)
treea6e55f5be3c24dfc0606c169b261f3f09b64f7ab /util/cbfstool/cbfstool.c
parentd5a4afa63d61e21851f0d46cab27b4eb9698ad90 (diff)
cbfstool: don't pass header_size as separate argument (part 2)
It's already present inside struct cbfs_file Change-Id: Ic9682e93c3d208e2ed458940e4a9f9f5a64b6e98 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/11333 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.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index 0939a06002..0481e7d0ba 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -154,9 +154,7 @@ static int cbfs_add_integer_component(const char *name,
header = cbfs_create_file_header(CBFS_COMPONENT_RAW,
buffer.size, name);
- uint32_t header_size = cbfs_calculate_file_header_size(name);
- if (cbfs_add_entry(&image, &buffer,
- offset, header, header_size) != 0) {
+ if (cbfs_add_entry(&image, &buffer, offset, header) != 0) {
ERROR("Failed to add %llu into ROM image as '%s'.\n",
(long long unsigned)u64val, name);
goto done;
@@ -209,7 +207,6 @@ static int cbfs_add_component(const char *filename,
struct cbfs_file *header =
cbfs_create_file_header(type, buffer.size, name);
- uint32_t header_size = cbfs_calculate_file_header_size(name);
if (convert && convert(&buffer, &offset, header) != 0) {
ERROR("Failed to parse file '%s'.\n", filename);
@@ -221,9 +218,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, offset,
- header, header_size)
- != 0) {
+ if (cbfs_add_entry(&image, &buffer, offset, header) != 0) {
ERROR("Failed to add '%s' into ROM image.\n", filename);
free(header);
buffer_delete(&buffer);