]> git.ozlabs.org Git - petitboot/commit
discover/grub2: Fix handling of positional parameters
authorAlan Dunn <amdunn@google.com>
Wed, 2 Mar 2016 16:59:02 +0000 (08:59 -0800)
committerSam Mendoza-Jonas <sam@mendozajonas.com>
Tue, 15 Mar 2016 03:10:22 +0000 (14:10 +1100)
commitc19daa69bc15e73b7ebf79d5280ba62c86c20b6f
tree2cb1d9620a3e8d96fc3d3285b568e0e126591c98
parent939660528bf1568c55b6dcf982cc9020c1dbcdd2
discover/grub2: Fix handling of positional parameters

Positional parameters are set in the environment with '$' prepended to
the name.  This causes lookups to fail because parameter lookups don't
include the '$'.

TESTED:
 Added a test that covers positional parameters in GRUB2 parser.
 Build succeeds, tests pass.

Bootstrapped-by: Nancy Yuen <yuenn@google.com>
Signed-off-by: Alan Dunn <amdunn@google.com>
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
discover/grub2/script.c
test/parser/Makefile.am
test/parser/test-grub2-pos-param.c [new file with mode: 0644]