summaryrefslogtreecommitdiffstats
path: root/util/cbfstool/cbfs_image.h
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2015-08-12 09:20:11 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-08-13 16:09:52 +0200
commit57edf16be5ddef5da272ff8e1a9f1d78091377d9 (patch)
treee5270e2260593920656d0d3ad0b7887b1affa3d5 /util/cbfstool/cbfs_image.h
parentedf25d9076de79579bafa1010bb5350c4c992158 (diff)
downloadcoreboot-57edf16be5ddef5da272ff8e1a9f1d78091377d9.tar.gz
coreboot-57edf16be5ddef5da272ff8e1a9f1d78091377d9.tar.bz2
coreboot-57edf16be5ddef5da272ff8e1a9f1d78091377d9.zip
cbfstool: factor out creating a cbfs file header
We will want to create headers that live outside the final image at some point (eg. to build the file before we even know where to place it). Change-Id: Ie4c0323df8d5be955aec3621b75309e8f11fae49 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: http://review.coreboot.org/11219 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'util/cbfstool/cbfs_image.h')
-rw-r--r--util/cbfstool/cbfs_image.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/cbfstool/cbfs_image.h b/util/cbfstool/cbfs_image.h
index ad999e357d91..432ea72cea94 100644
--- a/util/cbfstool/cbfs_image.h
+++ b/util/cbfstool/cbfs_image.h
@@ -99,6 +99,11 @@ int cbfs_add_entry(struct cbfs_image *image, struct buffer *buffer,
/* Removes an entry from CBFS image. Returns 0 on success, otherwise non-zero. */
int cbfs_remove_entry(struct cbfs_image *image, const char *name);
+/* Create a new cbfs file header structure to work with.
+ Returns newly allocated memory that the caller needs to free after use. */
+struct cbfs_file *cbfs_create_file_header(int type, size_t len,
+ const char *name);
+
/* Initializes a new empty (type = NULL) entry with size and name in CBFS image.
* Returns 0 on success, otherwise (ex, not found) non-zero. */
int cbfs_create_empty_entry(struct cbfs_file *entry, int type,