]> git.ozlabs.org Git - petitboot/commitdiff
grub2/grub2-parser: accept no whitespace in grub menuentry
authorBrett Grandbois <brett.grandbois@opengear.com>
Mon, 5 Feb 2018 20:40:31 +0000 (06:40 +1000)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Wed, 7 Feb 2018 21:01:42 +0000 (08:01 +1100)
The Yocto wic grub support will generate a grub.cfg with no whitespace
between the ending quote of the menuentry label and the opening bracket.
There doesn't seem to be anything in the specification that this is
illegal so accept it here.

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

index 598f0feb4d3b0c76cb68137b209743d05b519536..527a61c9f996124489727bb95f55594447820698 100644 (file)
@@ -122,7 +122,7 @@ statement: {
        | "function" word delim '{' statements '}' {
                $$ = create_statement_function(parser, $2, $5);
        }
        | "function" word delim '{' statements '}' {
                $$ = create_statement_function(parser, $2, $5);
        }
-       | "menuentry" words delim
+       | "menuentry" words delim0
                '{' statements '}' {
                $$ = create_statement_menuentry(parser, $2, $5);
        }
                '{' statements '}' {
                $$ = create_statement_menuentry(parser, $2, $5);
        }