diff options
| author | Amaury Pouly <amaury.pouly@gmail.com> | 2013-08-21 22:20:53 +0200 |
|---|---|---|
| committer | Amaury Pouly <amaury.pouly@gmail.com> | 2013-08-21 22:20:53 +0200 |
| commit | 99f3ca174e3e6a3e6a55931b012208be64d8be39 (patch) | |
| tree | 2a8a1a6ab55f44be85d287c06f9f35e0a5bd92fc /utils/imxtools/sbtools/elf.h | |
| parent | 1357e0a4f1567e4bf5f3ecb27c28457d1dfc1ab4 (diff) | |
| download | rockbox-99f3ca174e3e6a3e6a55931b012208be64d8be39.zip rockbox-99f3ca174e3e6a3e6a55931b012208be64d8be39.tar.gz rockbox-99f3ca174e3e6a3e6a55931b012208be64d8be39.tar.bz2 rockbox-99f3ca174e3e6a3e6a55931b012208be64d8be39.tar.xz | |
sbtools: more code refactoring
Factor all printf method with a unique one defined in misc.h
Change-Id: I58fbf8916b76e873a2e6678506d2c8aece7834ec
Diffstat (limited to 'utils/imxtools/sbtools/elf.h')
| -rw-r--r-- | utils/imxtools/sbtools/elf.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/imxtools/sbtools/elf.h b/utils/imxtools/sbtools/elf.h index 4200850..bc2971c 100644 --- a/utils/imxtools/sbtools/elf.h +++ b/utils/imxtools/sbtools/elf.h @@ -27,6 +27,7 @@ #include <stdbool.h> #include <stdlib.h> #include <unistd.h> +#include "misc.h" /** * API @@ -93,7 +94,6 @@ struct elf_params_t typedef bool (*elf_read_fn_t)(void *user, uint32_t addr, void *buf, size_t count); /* write function manages it's own error state */ typedef void (*elf_write_fn_t)(void *user, uint32_t addr, const void *buf, size_t count); -typedef void (*elf_printf_fn_t)(void *user, bool error, const char *fmt, ...); void elf_init(struct elf_params_t *params); void elf_add_load_section(struct elf_params_t *params, @@ -103,9 +103,8 @@ void elf_add_fill_section(struct elf_params_t *params, uint32_t elf_translate_virtual_address(struct elf_params_t *params, uint32_t addr); void elf_simplify(struct elf_params_t *params); void elf_sort_by_address(struct elf_params_t *params); -void elf_write_file(struct elf_params_t *params, elf_write_fn_t write, elf_printf_fn_t printf, void *user); -bool elf_read_file(struct elf_params_t *params, elf_read_fn_t read, elf_printf_fn_t printf, - void *user); +void elf_write_file(struct elf_params_t *params, elf_write_fn_t write, generic_printf_t printf, void *user); +bool elf_read_file(struct elf_params_t *params, elf_read_fn_t read, generic_printf_t printf, void *user); bool elf_is_empty(struct elf_params_t *params); void elf_set_start_addr(struct elf_params_t *params, uint32_t addr); bool elf_get_start_addr(struct elf_params_t *params, uint32_t *addr); @@ -116,7 +115,6 @@ bool elf_guess(elf_read_fn_t read, void *user); /* standard implementation of read/write/printf functions * with user being a FILE* pointer */ -void elf_std_printf(void *user, bool error, const char *fmt, ...); void elf_std_write(void *user, uint32_t addr, const void *buf, size_t count); bool elf_std_read(void *user, uint32_t addr, void *buf, size_t count); |