diff options
author | Aaron Durbin <adurbin@chromium.org> | 2015-09-15 12:50:14 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2015-09-16 14:11:03 +0000 |
commit | d7339411a983e562cddeba676384ad836bb56ec9 (patch) | |
tree | 74efa7d6ab2375ce4a8831b071f69a6a014295e9 /util/cbfstool/cbfs_image.h | |
parent | b39a974d75ac597b29eb83b5ce347a506e0e6015 (diff) |
cbfstool: provide metadata size to cbfs_locate_entry()
The cbfs_locate_entry() function had a hack in there which
assumed a struct cbfs_stage data was being added in addition
to the struct cbfs_file and name. Move that logic out to the
callers while still maintaining the logic for consistency.
The only impacted commands cbfs_add and cbfs_locate, but
those are using the default 'always adding struct cbfs_stage'
in addition to cbfs_file + name. Eventually those should be
removed when cbfs_locate is removed as cbfs_add has no smarts
related to the cbfs file type provided.
BUG=chrome-os-partner:44827
BRANCH=None
TEST=Built rambi.
Change-Id: I2771116ea1ff439ea53b8886e1f33e0e637a79d4
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11668
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/cbfstool/cbfs_image.h')
-rw-r--r-- | util/cbfstool/cbfs_image.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/cbfstool/cbfs_image.h b/util/cbfstool/cbfs_image.h index aea826053a..baceb51373 100644 --- a/util/cbfstool/cbfs_image.h +++ b/util/cbfstool/cbfs_image.h @@ -112,8 +112,8 @@ int cbfs_create_empty_entry(struct cbfs_file *entry, int type, * "page_size" limits the content to fit on same memory page, and * "align" specifies starting address alignment. * Returns a valid offset, or -1 on failure. */ -int32_t cbfs_locate_entry(struct cbfs_image *image, const char *name, - uint32_t size, uint32_t page_size, uint32_t align); +int32_t cbfs_locate_entry(struct cbfs_image *image, size_t size, + size_t page_size, size_t align, size_t metadata_size); /* Callback function used by cbfs_walk. * Returns 0 on success, or non-zero to stop further iteration. */ |