Lines Matching full:backend

30 #include "backend.h"
45 static int file_dev_init(struct backend *backend, void *data) in file_dev_init() argument
85 if (backend->flash_size == 0) { in file_dev_init()
87 backend->flash_size = statbuf.st_size; in file_dev_init()
91 backend->erase_size_shift = log_2(FILE_ERASE_SIZE); in file_dev_init()
92 backend->block_size_shift = backend->erase_size_shift; in file_dev_init()
95 backend->priv = priv; in file_dev_init()
105 static void file_dev_free(struct backend *backend) in file_dev_free() argument
107 struct file_data *priv = backend->priv; in file_dev_free()
123 static int file_erase(struct backend *backend, uint32_t offset, uint32_t count) in file_erase() argument
125 const uint32_t erase_size = 1 << backend->erase_size_shift; in file_erase()
126 struct file_data *priv = backend->priv; in file_erase()
154 * @context: The backend context pointer
162 static int64_t file_copy(struct backend *backend, uint32_t offset, in file_copy() argument
165 struct file_data *priv = backend->priv; in file_copy()
201 static int file_write(struct backend *backend, uint32_t offset, void *buf, in file_write() argument
204 struct file_data *priv = backend->priv; in file_write()
233 * @context: The backend context pointer
239 static int file_reset(struct backend *backend, void *buf, uint32_t count) in file_reset() argument
241 struct file_data *priv = backend->priv; in file_reset()
245 len = MIN(backend->flash_size, count); in file_reset()
248 assert(len == backend->flash_size); in file_reset()
269 struct backend backend_get_file(void) in backend_get_file()
271 struct backend be = {0}; in backend_get_file()
278 int backend_probe_file(struct backend *master, const char *path) in backend_probe_file()
280 struct backend with; in backend_probe_file()