]> git.ozlabs.org Git - petitboot/commit
Allow evaluation of arbitrarily-positioned arguments in GRUB2 parser
authorAlan Dunn <amdunn@google.com>
Wed, 2 Mar 2016 16:59:03 +0000 (08:59 -0800)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Tue, 26 Apr 2016 02:56:36 +0000 (12:56 +1000)
commit013bf20025957f1b812f0c6e50f8d7afa215e1a3
treeb8b6285f1c9eb703f03e0734833156e2b3a4f890
parent9f0f86150e9bf14760e155768dcb7df682257327
Allow evaluation of arbitrarily-positioned arguments in GRUB2 parser

GRUB2 allows essentially arbitrary numbers of positional arguments, so
ensure that they can be evaluated within scripts.  GRUB2 also appears
to support arbitrary numbers of leading 0's in positional parameters
(i.e., $01 should evalute the same as $1), but this doesn't seem like
a particularly important case to support.

Tested:
 Modified test-grub2-pos-param to cover higher-numbered positional
 arguments.

Signed-off-by: Alan Dunn <amdunn@google.com>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
discover/grub2/grub2-lexer.l
test/parser/test-grub2-pos-param.c