[PATCH 4/7] grub2/grub2-parser: accept no whitespace in grub menuentry

Brett Grandbois brett.grandbois at opengear.com
Tue Feb 6 07:40:31 AEDT 2018


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 at opengear.com>
---
 discover/grub2/grub2-parser.y | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/discover/grub2/grub2-parser.y b/discover/grub2/grub2-parser.y
index 598f0fe..527a61c 100644
--- a/discover/grub2/grub2-parser.y
+++ b/discover/grub2/grub2-parser.y
@@ -122,7 +122,7 @@ statement: {
 	| "function" word delim '{' statements '}' {
 		$$ = create_statement_function(parser, $2, $5);
 	}
-	| "menuentry" words delim
+	| "menuentry" words delim0
 		'{' statements '}' {
 		$$ = create_statement_menuentry(parser, $2, $5);
 	}
-- 
2.7.4



More information about the Petitboot mailing list