summaryrefslogtreecommitdiffstats
path: root/util/cbfstool/cbfs_image.h
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-07-15 20:49:00 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-09-01 14:51:09 +0000
commit2c61506630b8e76bed93b3a5ac0ab2089376f548 (patch)
treeefb84eaa9a3f23eb05885f85c6b5f52a291b02a4 /util/cbfstool/cbfs_image.h
parent4a666423c6d71614b7c2b539afa33d823c1896d5 (diff)
downloadcoreboot-2c61506630b8e76bed93b3a5ac0ab2089376f548.tar.gz
coreboot-2c61506630b8e76bed93b3a5ac0ab2089376f548.tar.bz2
coreboot-2c61506630b8e76bed93b3a5ac0ab2089376f548.zip
cbfstool: add extended file attributes for cbfs_file
cbfs_file_first_attr(struct cbfs_file *) and cbfs_file_next_attr(struct cbfs_file *, struct cbfs_file_attribute *) help navigate through extended attributes. cbfs_add_file_attr(header, tag, size) adds a new file attribute to header. Change-Id: I325965286c44f31abd95df684d340cebb0e68b75 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/10934 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.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/util/cbfstool/cbfs_image.h b/util/cbfstool/cbfs_image.h
index 7a9b48402f15..aea826053aa0 100644
--- a/util/cbfstool/cbfs_image.h
+++ b/util/cbfstool/cbfs_image.h
@@ -170,4 +170,18 @@ int cbfs_merge_empty_entry(struct cbfs_image *image, struct cbfs_file *entry,
/* Returns the size of a cbfs file header with no extensions */
size_t cbfs_calculate_file_header_size(const char *name);
+
+/* Given a cbfs_file, return the first file attribute, or NULL. */
+struct cbfs_file_attribute *cbfs_file_first_attr(struct cbfs_file *file);
+
+/* Given a cbfs_file and a cbfs_file_attribute, return the attribute that
+ * follows it, or NULL. */
+struct cbfs_file_attribute *cbfs_file_next_attr(struct cbfs_file *file,
+ struct cbfs_file_attribute *attr);
+
+/* Adds to header a new extended attribute tagged 'tag', sized 'size'.
+ * Returns pointer to the new attribute, or NULL on error. */
+struct cbfs_file_attribute *cbfs_add_file_attr(struct cbfs_file *header,
+ uint32_t tag,
+ uint32_t size);
#endif