mkimage: Rename struct image_type_params to imgtool_funcs

The current name is quite confusing. Mostly this struct holds function
pointers, not parameters. Rename it to imgtool_funcs, so that is has the
same prefix as imgtool (introduced in the next patch) and it is clear
that it provides functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-07-31 11:55:19 +12:00
parent 7d7f6811ea
commit fe1300387b
19 changed files with 48 additions and 50 deletions

View File

@@ -9,13 +9,13 @@
#include <image.h>
struct image_type_params *imagetool_get_type(int type)
struct imgtool_funcs *imagetool_get_type(int type)
{
struct image_type_params **curr;
struct imgtool_funcs **curr;
INIT_SECTION(image_type);
struct image_type_params **start = __start_image_type;
struct image_type_params **end = __stop_image_type;
struct imgtool_funcs **start = __start_image_type;
struct imgtool_funcs **end = __stop_image_type;
for (curr = start; curr != end; curr++) {
if ((*curr)->check_image_type) {
@@ -29,21 +29,21 @@ struct image_type_params *imagetool_get_type(int type)
static int imagetool_verify_print_header_by_type(
void *ptr,
struct stat *sbuf,
struct image_type_params *tparams,
struct imgtool_funcs *tparams,
struct image_tool_params *params);
int imagetool_verify_print_header(
void *ptr,
struct stat *sbuf,
struct image_type_params *tparams,
struct imgtool_funcs *tparams,
struct image_tool_params *params)
{
int retval = -1;
struct image_type_params **curr;
struct imgtool_funcs **curr;
INIT_SECTION(image_type);
struct image_type_params **start = __start_image_type;
struct image_type_params **end = __stop_image_type;
struct imgtool_funcs **start = __start_image_type;
struct imgtool_funcs **end = __stop_image_type;
if (tparams)
return imagetool_verify_print_header_by_type(ptr, sbuf, tparams, params);
@@ -88,7 +88,7 @@ int imagetool_verify_print_header(
static int imagetool_verify_print_header_by_type(
void *ptr,
struct stat *sbuf,
struct image_type_params *tparams,
struct imgtool_funcs *tparams,
struct image_tool_params *params)
{
int retval = -1;