[coreboot-gerrit] Change in coreboot[master]: commonlib/cbfs: Make cbfsf_file_type public

Patrick Rudolph (Code Review) gerrit at coreboot.org
Thu Apr 26 10:37:34 CEST 2018


Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/25859


Change subject: commonlib/cbfs: Make cbfsf_file_type public
......................................................................

commonlib/cbfs: Make cbfsf_file_type public

Make cbfsf_file_type public to support multiple payload types in
prog_loaders.

Change-Id: I37e9fb06f926dc71b001722a6c3b6205a2f20462
Signed-off-by: Patrick Rudolph <patrick.rudolph at 9elements.com>
---
M src/commonlib/cbfs.c
M src/commonlib/include/commonlib/cbfs.h
2 files changed, 7 insertions(+), 1 deletion(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/25859/1

diff --git a/src/commonlib/cbfs.c b/src/commonlib/cbfs.c
index 1db8d31..11e8a27 100644
--- a/src/commonlib/cbfs.c
+++ b/src/commonlib/cbfs.c
@@ -156,7 +156,7 @@
 	return 0;
 }
 
-static int cbfsf_file_type(struct cbfsf *fh, uint32_t *ftype)
+int cbfsf_file_type(struct cbfsf *fh, uint32_t *ftype)
 {
 	const size_t sz = sizeof(*ftype);
 
diff --git a/src/commonlib/include/commonlib/cbfs.h b/src/commonlib/include/commonlib/cbfs.h
index 163bef2..c31df51 100644
--- a/src/commonlib/include/commonlib/cbfs.h
+++ b/src/commonlib/include/commonlib/cbfs.h
@@ -71,6 +71,12 @@
 int cbfsf_decompression_info(struct cbfsf *fh, uint32_t *algo, size_t *size);
 
 /*
+ * Return the CBFS file type as out-parameter.
+ * Returns 0 on success and < 0 on error.
+ */
+int cbfsf_file_type(struct cbfsf *fh, uint32_t *ftype);
+
+/*
  * Perform the vb2 hash over the CBFS region skipping empty file contents.
  * Caller is responsible for providing the hash algorithm as well as storage
  * for the final digest. Return 0 on success or non-zero on error.

-- 
To view, visit https://review.coreboot.org/25859
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I37e9fb06f926dc71b001722a6c3b6205a2f20462
Gerrit-Change-Number: 25859
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph at 9elements.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180426/1d9b5923/attachment-0001.html>


More information about the coreboot-gerrit mailing list