Patrick Georgi (pgeorgi@google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11214
-gerrit
commit fc8df329ffff04b7f393044c37d723f639892743 Author: Patrick Georgi pgeorgi@google.com Date: Tue Aug 11 15:10:02 2015 +0200
cbfstool: expose cbfs_calculate_file_header_size()
Headers vary in size soon, and more places need to be able to calculate their size.
Change-Id: I30761bb9da0756418993dee21d8fa18cf3174c40 Signed-off-by: Patrick Georgi pgeorgi@google.com --- util/cbfstool/cbfs_image.c | 2 +- util/cbfstool/cbfs_image.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c index e78ee40..ed065b0 100644 --- a/util/cbfstool/cbfs_image.c +++ b/util/cbfstool/cbfs_image.c @@ -112,7 +112,7 @@ int cbfs_parse_comp_algo(const char *name)
/* CBFS image */
-static size_t cbfs_calculate_file_header_size(const char *name) +size_t cbfs_calculate_file_header_size(const char *name) { return (sizeof(struct cbfs_file) + align_up(strlen(name) + 1, CBFS_FILENAME_ALIGN)); diff --git a/util/cbfstool/cbfs_image.h b/util/cbfstool/cbfs_image.h index 907be61..ecd7db7 100644 --- a/util/cbfstool/cbfs_image.h +++ b/util/cbfstool/cbfs_image.h @@ -164,4 +164,6 @@ int cbfs_print_entry_info(struct cbfs_image *image, struct cbfs_file *entry, int cbfs_merge_empty_entry(struct cbfs_image *image, struct cbfs_file *entry, void *arg);
+/* Returns the size of a cbfs file header with no extensions */ +size_t cbfs_calculate_file_header_size(const char *name); #endif