summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-09-17 20:45:52 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-09-17 20:13:47 +0000
commiteb33b3f80e2fac8f92035a7960cf460981487b2d (patch)
treec622dd4dc4f43720b174ef60ef02fae5aada50cf /payloads/libpayload/include
parent1bb487c474c378cf61bd28f83b9eb87162ffc1c4 (diff)
libpayload: provide cbfs_file_find_attr()
cbfs_file_find_attr(file, tag) finds the first attribute of file with the given tag. Change-Id: I78ee3b996b4b086605244c5d7d57ef7e3fc1db47 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/11678 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r--payloads/libpayload/include/cbfs_core.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/payloads/libpayload/include/cbfs_core.h b/payloads/libpayload/include/cbfs_core.h
index 3878e55f23..ec59a20d72 100644
--- a/payloads/libpayload/include/cbfs_core.h
+++ b/payloads/libpayload/include/cbfs_core.h
@@ -170,6 +170,11 @@ struct cbfs_file_attribute *cbfs_file_first_attr(struct cbfs_file *file);
struct cbfs_file_attribute *cbfs_file_next_attr(struct cbfs_file *file,
struct cbfs_file_attribute *attr);
+/* Given a cbfs_file and an attribute tag, return the first instance of the
+ * attribute or NULL if none found. */
+struct cbfs_file_attribute *cbfs_file_find_attr(struct cbfs_file *file,
+ uint32_t tag);
+
/*** Component sub-headers ***/
/* Following are component sub-headers for the "standard"