|
|
|
@ -9,6 +9,32 @@ |
|
|
|
|
|
|
|
|
|
#include <ftl.h> |
|
|
|
|
|
|
|
|
|
int __wrap_is_group_erased(struct ftl_map *map, uint32_t group) |
|
|
|
|
{ |
|
|
|
|
check_expected_ptr(map); |
|
|
|
|
check_expected(group); |
|
|
|
|
|
|
|
|
|
return mock_type(int); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int __wrap_find_block(struct ftl_map *map, struct ftl_page_group *group, |
|
|
|
|
uint32_t *where, uint32_t block) |
|
|
|
|
{ |
|
|
|
|
struct ftl_page_group *ret_group; |
|
|
|
|
|
|
|
|
|
check_expected_ptr(map); |
|
|
|
|
check_expected(block); |
|
|
|
|
|
|
|
|
|
ret_group = mock_type(struct ftl_page_group *); |
|
|
|
|
|
|
|
|
|
if (ret_group) |
|
|
|
|
memcpy(group, ret_group, sizeof *group); |
|
|
|
|
|
|
|
|
|
*where = mock_type(uint32_t); |
|
|
|
|
|
|
|
|
|
return mock_type(int); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int __wrap_prepare_head(struct ftl_map *map) |
|
|
|
|
{ |
|
|
|
|
(void)map; |
|
|
|
|