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@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.