summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javierm@redhat.com>2018-04-17 19:08:59 +0200
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-04-18 11:10:45 +1000
commitf78714f16515783d79e636040cedccb3eb6611a3 (patch)
tree220491d017501d6644dbba3301c5fcda2924fb20
parent73bcd24e9a96468b81395e7f57d3568e5d1f7dd3 (diff)
downloadtalos-petitboot-f78714f16515783d79e636040cedccb3eb6611a3.zip
talos-petitboot-f78714f16515783d79e636040cedccb3eb6611a3.tar.gz
discover/grub: Don't add discover context boot options in blscfg handler
Instead of adding a boot option explicitly, just add it to the grub script boot option list and increment the number of options. That way BLS entries will be known by the grub script handler and can check if is a valid index. Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
-rw-r--r--discover/grub2/blscfg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/discover/grub2/blscfg.c b/discover/grub2/blscfg.c
index d20dde2..5dadd2c 100644
--- a/discover/grub2/blscfg.c
+++ b/discover/grub2/blscfg.c
@@ -143,7 +143,8 @@ static void bls_finish(struct conf_context *conf)
option->is_default = option_is_default(state->script, option);
- discover_context_add_boot_option(dc, opt);
+ list_add_tail(&state->script->options, &opt->list);
+ state->script->n_options++;
device_handler_status_dev_info(dc->handler, dc->device,
_("Created menu entry from BLS file %s"),
OpenPOWER on IntegriCloud