[coreboot-gerrit] New patch to review for coreboot: cbfstool: Move cbfs_file_get_header to fit.c
Furquan Shaikh (furquan@google.com)
gerrit at coreboot.org
Mon May 23 17:49:15 CEST 2016
Furquan Shaikh (furquan at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14949
-gerrit
commit 31491d5b519901e618bb06c35557fb1a57e88727
Author: Furquan Shaikh <furquan at google.com>
Date: Mon May 23 08:44:46 2016 -0700
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 at google.com>
---
util/cbfstool/cbfs.h | 3 ---
util/cbfstool/common.c | 9 ---------
util/cbfstool/fit.c | 9 +++++++++
3 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/util/cbfstool/cbfs.h b/util/cbfstool/cbfs.h
index 641c6a1..36b9fc0 100644
--- a/util/cbfstool/cbfs.h
+++ b/util/cbfstool/cbfs.h
@@ -254,9 +254,6 @@ static size_t widths_cbfs_hash[] unused = {
uint32_t get_cbfs_entry_type(const char *name, uint32_t default_value);
uint32_t get_cbfs_compression(const char *name, uint32_t unknown);
-/* common.c */
-void cbfs_file_get_header(struct buffer *buf, struct cbfs_file *file);
-
/* cbfs-mkpayload.c */
void xdr_segs(struct buffer *output,
struct cbfs_payload_segment *segs, int nseg);
diff --git a/util/cbfstool/common.c b/util/cbfstool/common.c
index 4534d85..bbb6141 100644
--- a/util/cbfstool/common.c
+++ b/util/cbfstool/common.c
@@ -122,15 +122,6 @@ void buffer_delete(struct buffer *buffer)
buffer->size = 0;
}
-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 struct {
uint32_t arch;
const char *name;
diff --git a/util/cbfstool/fit.c b/util/cbfstool/fit.c
index 584103b..6de311c 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;
More information about the coreboot-gerrit
mailing list