From 53e0f3ef35ac694220dce135f01a4f736cbd1c19 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Thu, 20 Jun 2019 18:09:55 +0200 Subject: discover/grub2: Allow using title for default even if id was defined A default menu entry can be chosen using any of the following attributes: index, title or id (if the entry was defined with the --id option). But Petitboot doesn't honor this correctly and only compares the default with the menu entry title if the entry doesn't have an id defined. This is wrong since an index or title can be used even if an id was defined. This issue wasn't covered by the test that sets a default using a title because the menu entries didn't have an id defined. Add an id to them. Signed-off-by: Javier Martinez Canillas Signed-off-by: Samuel Mendoza-Jonas --- test/parser/test-grub2-default-multiword.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/parser') diff --git a/test/parser/test-grub2-default-multiword.c b/test/parser/test-grub2-default-multiword.c index 25d1cf1..d455d62 100644 --- a/test/parser/test-grub2-default-multiword.c +++ b/test/parser/test-grub2-default-multiword.c @@ -3,10 +3,10 @@ #if 0 /* PARSER_EMBEDDED_CONFIG */ set default="Multiple word option" -menuentry 'Non-defalt option' { +menuentry 'Non-defalt option' --id=option0 { linux /vmlinux.non-default } -menuentry 'Multiple word option' { +menuentry 'Multiple word option' --id=option1 { linux /vmlinux } #endif -- cgit v1.2.1