Hi,


Attached patch (experimental) adds a new tool, grub-script-check, that
can be used to check grub.cfg file syntax.  Idea is to use this tool
during update-grub to catch any syntax errors and reject the update.

This tool uses the same parsing code as the normal mode script engine,
except that it doesn't (cannot) execute any commands.  Let me know
your comments.

As part of this tool, I found few bugs in parser.y script and is
updated as necessary.  Basically, current parser.y can parse only one
menuentry or function command (and expects an $end after '}'), which
is wrong because grub.cfg contains multiple function/menuentry
definitions.  This was raising a syntax error, which is fixed by
modifying the gammar to support multiple menuentry/function commands.



thanks,
-- 
bvk.chaitanya

Attachment: grub-script-check.patch
Description: Binary data

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to