From 9504b2fc2b0ebe03fd0462b0dd2e38ee99ec3615 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 14 Jul 2013 17:12:04 +0200 Subject: [PATCH] mxssb: Wrap the verbose boot flag into image context The verbose boot flag should be part of the image context, make it so. Signed-off-by: Marek Vasut --- mxssb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mxssb.c b/mxssb.c index 78db402..fbac0ae 100644 --- a/mxssb.c +++ b/mxssb.c @@ -66,7 +66,7 @@ struct sb_section_ctx { struct sb_image_ctx { enum sb_target_cpu target_cpu; - int verbose_boot; + unsigned int verbose_boot:1; struct sb_section_ctx *sect; EVP_CIPHER_CTX cipher_ctx; @@ -79,8 +79,6 @@ struct sb_image_ctx { struct sb_boot_image_header payload; }; -static int verbose_boot = 0; - #define SB_IVT_LOAD_ADDR 0x8000 #define SB_SPL_LOAD_ADDR 0x0 #define SB_SPL_ENTRY_ADDR 0x14 @@ -744,7 +742,7 @@ static int sb_prefill_image_header(struct sb_image_ctx *ictx) hdr->timestamp_us = sb_get_timestamp() * 1000000; /* FIXME -- add proper config option */ - hdr->flags = verbose_boot ? SB_IMAGE_FLAG_VERBOSE : 0, + hdr->flags = ictx->verbose_boot ? SB_IMAGE_FLAG_VERBOSE : 0, /* FIXME -- We support only default key */ hdr->key_count = 1; @@ -980,7 +978,7 @@ int main(int argc, char **argv) output_filename = optarg; break; case 'v': - verbose_boot = 1; + ctx.verbose_boot = 1; break; case 'h': print_help(argv[0]); -- GitLab