From 2972d7d62f8f177bf2186c7a38bdae53dff99a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Wed, 29 Mar 2023 21:25:54 +0200 Subject: tools: imagetool: Extend print_header() by params argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows image type print_header() callback to access struct image_tool_params *params. Signed-off-by: Pali Rohár Reviewed-by: Simon Glass --- tools/default_image.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools/default_image.c') diff --git a/tools/default_image.c b/tools/default_image.c index dc429ce9e46..0e49ab33015 100644 --- a/tools/default_image.c +++ b/tools/default_image.c @@ -41,6 +41,11 @@ static int image_check_params(struct image_tool_params *params) (params->lflag && (params->dflag || params->fflag))); } +static void image_print_header(const void *ptr, struct image_tool_params *params) +{ + image_print_contents(ptr); +} + static int image_verify_header(unsigned char *ptr, int image_size, struct image_tool_params *params) { @@ -201,7 +206,7 @@ U_BOOT_IMAGE_TYPE( (void *)&header, image_check_params, image_verify_header, - image_print_contents, + image_print_header, image_set_header, image_extract_subimage, image_check_image_types, -- cgit v1.2.3