fit: Put the indent string into print context

Move the indent string into struct fit_print_ctx so it is available to
the printing functions. This avoids having to pass it as a separate
parameter.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-11-17 15:37:29 -07:00
parent 6b6f03c388
commit 62a4c7e10a
4 changed files with 49 additions and 31 deletions

View File

@@ -976,8 +976,8 @@ static int fit_extract_contents(void *ptr, struct imgtool *itl)
printf("Extracted:\n%s Image %u (%s)\n", p,
count, fit_get_name(fit, noffset));
fit_print_init(&ctx, fit);
fit_image_print(&ctx, noffset, p);
fit_print_init(&ctx, fit, p);
fit_image_print(&ctx, noffset);
return fit_image_extract(fit, noffset,
itl->outfile);