[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Syntax checker for GRUB script config file
From: |
BVK |
Subject: |
[PATCH] Syntax checker for GRUB script config file |
Date: |
Fri, 4 Dec 2009 07:12:12 +0000 |
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
grub-script-check.patch
Description: Binary data
- [PATCH] Syntax checker for GRUB script config file,
BVK <=