summaryrefslogtreecommitdiffstats
path: root/src/include/cbfs.h
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2022-03-04 17:49:56 -0800
committerJulius Werner <jwerner@chromium.org>2022-03-09 02:18:21 +0000
commit69cc557cfb6eb2cbb5b137bc206cd759c1dba5f0 (patch)
treeab51422700fa7f5257fb72cc72bf8330780f8e06 /src/include/cbfs.h
parent270b0b60acba4802b8a9272d2727ee576733ad47 (diff)
downloadcoreboot-69cc557cfb6eb2cbb5b137bc206cd759c1dba5f0.tar.gz
coreboot-69cc557cfb6eb2cbb5b137bc206cd759c1dba5f0.tar.bz2
coreboot-69cc557cfb6eb2cbb5b137bc206cd759c1dba5f0.zip
commonlib/bsd: Remove cb_err_t
cb_err_t was meant to be used in place of `enum cb_err` in all situations, but the choice to use a typedef here seems to be controversial. We should not be arbitrarily using two different identifiers for the same thing across the codebase, so since there are no use cases for serializing enum cb_err at the moment (which would be the primary reason to typedef a fixed-width integer instead), remove cb_err_t again for now. Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: Iaec36210d129db26d51f0a105d3de070c03b686b Reviewed-on: https://review.coreboot.org/c/coreboot/+/62600 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/include/cbfs.h')
-rw-r--r--src/include/cbfs.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/include/cbfs.h b/src/include/cbfs.h
index 5731d6efd8a4..f0ae7a80ef7f 100644
--- a/src/include/cbfs.h
+++ b/src/include/cbfs.h
@@ -132,7 +132,7 @@ void cbfs_preload(const char *name);
void cbfs_unmap(void *mapping);
/* Load stage into memory filling in prog. Return 0 on success. < 0 on error. */
-int cbfs_prog_stage_load(struct prog *prog);
+enum cb_err cbfs_prog_stage_load(struct prog *prog);
/* Returns the size of a CBFS file, or 0 on error. Avoid using this function to allocate space,
and instead use cbfs_alloc() so the file only needs to be looked up once. */
@@ -185,15 +185,15 @@ const struct cbfs_boot_device *cbfs_get_boot_device(bool force_ro);
* hash was still verified. Should be called once per *boot* (not once per stage) before the
* first CBFS access.
*/
-cb_err_t cbfs_init_boot_device(const struct cbfs_boot_device *cbd,
- struct vb2_hash *metadata_hash);
+enum cb_err cbfs_init_boot_device(const struct cbfs_boot_device *cbd,
+ struct vb2_hash *metadata_hash);
/**********************************************************************************************
* INTERNAL HELPERS FOR INLINES, DO NOT USE. *
**********************************************************************************************/
-cb_err_t _cbfs_boot_lookup(const char *name, bool force_ro,
- union cbfs_mdata *mdata, struct region_device *rdev);
+enum cb_err _cbfs_boot_lookup(const char *name, bool force_ro,
+ union cbfs_mdata *mdata, struct region_device *rdev);
void *_cbfs_alloc(const char *name, cbfs_allocator_t allocator, void *arg,
size_t *size_out, bool force_ro, enum cbfs_type *type);