mbox series

[0/2] discover/grub2: A couple of fixes for default entry matching

Message ID 20190620160956.20651-1-javierm@redhat.com
Headers show
Series discover/grub2: A couple of fixes for default entry matching | expand

Message

Javier Martinez Canillas June 20, 2019, 4:09 p.m. UTC
Hello,

I have found a couple of bugs in Petitboot when setting a default entry.
This patch-set fixes these issues.

Patch #1 allows to define the default entry using its title regardless if
that entry has an id defined or not.

Patch #2 allows to not only define the menuentry id as --id=foo, but also
as --id foo which should be supported as well according to the GRUB docs.

Best regards,
Javier


Javier Martinez Canillas (2):
  discover/grub2: Allow using title for default even if id was defined
  discover/grub2: Allow to separate the --id argument using a space char

 discover/grub2/script.c                    | 21 ++++++++-----
 test/parser/Makefile.am                    |  2 ++
 test/parser/test-grub2-default-id-space.c  | 34 ++++++++++++++++++++++
 test/parser/test-grub2-default-id.c        | 34 ++++++++++++++++++++++
 test/parser/test-grub2-default-multiword.c |  4 +--
 5 files changed, 85 insertions(+), 10 deletions(-)
 create mode 100644 test/parser/test-grub2-default-id-space.c
 create mode 100644 test/parser/test-grub2-default-id.c

Comments

Sam Mendoza-Jonas June 21, 2019, 3:44 a.m. UTC | #1
On Thu, 2019-06-20 at 18:09 +0200, Javier Martinez Canillas wrote:
> Hello,
> 
> I have found a couple of bugs in Petitboot when setting a default entry.
> This patch-set fixes these issues.
> 
> Patch #1 allows to define the default entry using its title regardless if
> that entry has an id defined or not.
> 
> Patch #2 allows to not only define the menuentry id as --id=foo, but also
> as --id foo which should be supported as well according to the GRUB docs.
> 
> Best regards,
> Javier
> 
> 
> Javier Martinez Canillas (2):
>   discover/grub2: Allow using title for default even if id was defined
>   discover/grub2: Allow to separate the --id argument using a space char

Thanks for the fixes! Series merged as 7edc34c4

> 
>  discover/grub2/script.c                    | 21 ++++++++-----
>  test/parser/Makefile.am                    |  2 ++
>  test/parser/test-grub2-default-id-space.c  | 34 ++++++++++++++++++++++
>  test/parser/test-grub2-default-id.c        | 34 ++++++++++++++++++++++
>  test/parser/test-grub2-default-multiword.c |  4 +--
>  5 files changed, 85 insertions(+), 10 deletions(-)
>  create mode 100644 test/parser/test-grub2-default-id-space.c
>  create mode 100644 test/parser/test-grub2-default-id.c
>