summaryrefslogtreecommitdiff
path: root/util/cbfstool/fit.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2016-05-23 08:44:46 -0700
committerMartin Roth <martinroth@google.com>2016-05-26 23:51:08 +0200
commit1ac194e14a90563635b0a0a6a82ada87dcb8dbde (patch)
tree8954f76e318ecdd56af97d464dc404447288d14f /util/cbfstool/fit.c
parentc4ea8f7d3fb56b43482b8abd8405280f50d98864 (diff)
cbfstool: Move cbfs_file_get_header to fit.c
Since fit.c is the only caller of this function move it out of common.c and into fit.c. Change-Id: I64cc31a6d89ee425c5b07745ea5ca9437e2f3fcf Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/14949 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util/cbfstool/fit.c')
-rw-r--r--util/cbfstool/fit.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/util/cbfstool/fit.c b/util/cbfstool/fit.c
index 584103b154..6de311c75d 100644
--- a/util/cbfstool/fit.c
+++ b/util/cbfstool/fit.c
@@ -186,6 +186,15 @@ static void add_microcodde_entries(struct fit_table *fit,
}
}
+static void cbfs_file_get_header(struct buffer *buf, struct cbfs_file *file)
+{
+ bgets(buf, &file->magic, sizeof(file->magic));
+ file->len = xdr_be.get32(buf);
+ file->type = xdr_be.get32(buf);
+ file->attributes_offset = xdr_be.get32(buf);
+ file->offset = xdr_be.get32(buf);
+}
+
static int fit_header(void *ptr, uint32_t *current_offset, uint32_t *file_length)
{
struct buffer buf;