diff options
Diffstat (limited to 'payloads/libpayload/tests/libcbfs')
-rw-r--r-- | payloads/libpayload/tests/libcbfs/cbfs-lookup-test.c | 20 | ||||
-rw-r--r-- | payloads/libpayload/tests/libcbfs/cbfs-verification-test.c | 14 |
2 files changed, 17 insertions, 17 deletions
diff --git a/payloads/libpayload/tests/libcbfs/cbfs-lookup-test.c b/payloads/libpayload/tests/libcbfs/cbfs-lookup-test.c index 0f840763a8..0650e313e7 100644 --- a/payloads/libpayload/tests/libcbfs/cbfs-lookup-test.c +++ b/payloads/libpayload/tests/libcbfs/cbfs-lookup-test.c @@ -40,7 +40,7 @@ size_t ulz4fn(const void *src, size_t srcn, void *dst, size_t dstn) static size_t test_fmap_offset = 0; static size_t test_fmap_size = 0; -static cb_err_t test_fmap_result = CB_SUCCESS; +static enum cb_err test_fmap_result = CB_SUCCESS; static void set_fmap_locate_area_results(size_t offset, size_t size, size_t result) { @@ -49,15 +49,15 @@ static void set_fmap_locate_area_results(size_t offset, size_t size, size_t resu test_fmap_result = result; } -cb_err_t fmap_locate_area(const char *name, size_t *offset, size_t *size) +enum cb_err fmap_locate_area(const char *name, size_t *offset, size_t *size) { *offset = test_fmap_offset; *size = test_fmap_size; return test_fmap_result; } -cb_err_t cbfs_mcache_lookup(const void *mcache, size_t mcache_size, const char *name, - union cbfs_mdata *mdata_out, size_t *data_offset_out) +enum cb_err cbfs_mcache_lookup(const void *mcache, size_t mcache_size, const char *name, + union cbfs_mdata *mdata_out, size_t *data_offset_out) { assert_non_null(mcache); assert_true(mcache_size > 0 && mcache_size % CBFS_MCACHE_ALIGNMENT == 0); @@ -66,7 +66,7 @@ cb_err_t cbfs_mcache_lookup(const void *mcache, size_t mcache_size, const char * check_expected(name); - cb_err_t ret = mock_type(cb_err_t); + enum cb_err ret = mock_type(enum cb_err); if (ret != CB_SUCCESS) return ret; @@ -75,7 +75,7 @@ cb_err_t cbfs_mcache_lookup(const void *mcache, size_t mcache_size, const char * return CB_SUCCESS; } -static void expect_cbfs_mcache_lookup(const char *name, cb_err_t err, +static void expect_cbfs_mcache_lookup(const char *name, enum cb_err err, const union cbfs_mdata *mdata, size_t data_offset_out) { expect_string(cbfs_mcache_lookup, name, name); @@ -87,13 +87,13 @@ static void expect_cbfs_mcache_lookup(const char *name, cb_err_t err, } } -cb_err_t cbfs_lookup(cbfs_dev_t dev, const char *name, union cbfs_mdata *mdata_out, - size_t *data_offset_out, struct vb2_hash *metadata_hash) +enum cb_err cbfs_lookup(cbfs_dev_t dev, const char *name, union cbfs_mdata *mdata_out, + size_t *data_offset_out, struct vb2_hash *metadata_hash) { assert_non_null(dev); check_expected(name); - cb_err_t ret = mock_type(cb_err_t); + enum cb_err ret = mock_type(enum cb_err); if (ret != CB_SUCCESS) return ret; @@ -102,7 +102,7 @@ cb_err_t cbfs_lookup(cbfs_dev_t dev, const char *name, union cbfs_mdata *mdata_o return CB_SUCCESS; } -static void expect_cbfs_lookup(const char *name, cb_err_t err, const union cbfs_mdata *mdata, +static void expect_cbfs_lookup(const char *name, enum cb_err err, const union cbfs_mdata *mdata, size_t data_offset_out) { expect_string(cbfs_lookup, name, name); diff --git a/payloads/libpayload/tests/libcbfs/cbfs-verification-test.c b/payloads/libpayload/tests/libcbfs/cbfs-verification-test.c index 2ab3d5302d..1dcccf9ce9 100644 --- a/payloads/libpayload/tests/libcbfs/cbfs-verification-test.c +++ b/payloads/libpayload/tests/libcbfs/cbfs-verification-test.c @@ -53,19 +53,19 @@ size_t ulz4fn(const void *src, size_t srcn, void *dst, size_t dstn) return 0; } -cb_err_t cbfs_mcache_lookup(const void *mcache, size_t mcache_size, const char *name, - union cbfs_mdata *mdata_out, size_t *data_offset_out) +enum cb_err cbfs_mcache_lookup(const void *mcache, size_t mcache_size, const char *name, + union cbfs_mdata *mdata_out, size_t *data_offset_out) { return CB_CBFS_CACHE_FULL; } -cb_err_t cbfs_lookup(cbfs_dev_t dev, const char *name, union cbfs_mdata *mdata_out, - size_t *data_offset_out, struct vb2_hash *metadata_hash) +enum cb_err cbfs_lookup(cbfs_dev_t dev, const char *name, union cbfs_mdata *mdata_out, + size_t *data_offset_out, struct vb2_hash *metadata_hash) { assert_non_null(dev); check_expected(name); - cb_err_t ret = mock_type(cb_err_t); + enum cb_err ret = mock_type(enum cb_err); if (ret != CB_SUCCESS) return ret; @@ -74,7 +74,7 @@ cb_err_t cbfs_lookup(cbfs_dev_t dev, const char *name, union cbfs_mdata *mdata_o return CB_SUCCESS; } -static void expect_cbfs_lookup(const char *name, cb_err_t err, const union cbfs_mdata *mdata, +static void expect_cbfs_lookup(const char *name, enum cb_err err, const union cbfs_mdata *mdata, size_t data_offset_out) { expect_string(cbfs_lookup, name, name); @@ -91,7 +91,7 @@ const void *cbfs_find_attr(const union cbfs_mdata *mdata, uint32_t attr_tag, siz return mock_ptr_type(void *); } -cb_err_t fmap_locate_area(const char *name, size_t *offset, size_t *size) +enum cb_err fmap_locate_area(const char *name, size_t *offset, size_t *size) { *offset = 0; *size = 0; |