discover/grub: Add cmdline signature support for BLS entries
authorBrett Grandbois <brett.grandbois@opengear.com>
Thu, 3 May 2018 05:30:20 +0000 (15:30 +1000)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Fri, 4 May 2018 00:26:56 +0000 (10:26 +1000)
Follow along the way the linux builtin does it.

Signed-off-by: Brett Grandbois <brett.grandbois@opengear.com>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
discover/grub2/blscfg.c

index a1076b9db27b5002e2ba984779e881ae092170ad..78086ee9fb0fa8d286afe160f132d0883edefdeb 100644 (file)
@@ -148,6 +148,12 @@ static void bls_finish(struct conf_context *conf)
                opt->dtb = create_grub2_resource(opt, conf->dc->device,
                                                 root, state->dtb);
 
+       char* args_sigfile_default = talloc_asprintf(opt,
+               "%s.cmdline.sig", state->image);
+       opt->args_sig_file = create_grub2_resource(opt, conf->dc->device,
+                                               root, args_sigfile_default);
+       talloc_free(args_sigfile_default);
+
        option->is_default = option_is_default(state, option);
 
        list_add_tail(&state->script->options, &opt->list);