From e590358064a1db077a3dafec473433260a3ba646 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Tue, 25 Aug 2015 13:53:42 +0200 Subject: cbfstool: cbfs_add_entry() doesn't need to know filename or type They're passed as part of the header now. Change-Id: I7cd6296adac1fa72e0708b89c7009552e272f656 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/11327 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- util/cbfstool/cbfs_image.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'util/cbfstool/cbfs_image.c') diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c index 8297cf15bc..7066b99f31 100644 --- a/util/cbfstool/cbfs_image.c +++ b/util/cbfstool/cbfs_image.c @@ -532,24 +532,21 @@ static int cbfs_add_entry_at(struct cbfs_image *image, } int cbfs_add_entry(struct cbfs_image *image, struct buffer *buffer, - const char *name, uint32_t type, uint32_t content_offset, + uint32_t content_offset, void *header, uint32_t header_size) { assert(image); assert(buffer); assert(buffer->data); - assert(name); - type = type; assert(!IS_TOP_ALIGNED_ADDRESS(content_offset)); + const char *name = ((struct cbfs_file *)header)->filename; + uint32_t entry_type; uint32_t addr, addr_next; struct cbfs_file *entry, *next; uint32_t need_size; - if (header_size == 0) - header_size = cbfs_calculate_file_header_size(name); - need_size = header_size + buffer->size; DEBUG("cbfs_add_entry('%s'@0x%x) => need_size = %u+%zu=%u\n", name, content_offset, header_size, buffer->size, need_size); -- cgit v1.2.3