]> git.ozlabs.org Git - petitboot/commit
discover/grub2: Fix behavior of save_env -f
authorAlan Dunn <amdunn@google.com>
Tue, 12 Jan 2016 23:43:02 +0000 (15:43 -0800)
committerSam Mendoza-Jonas <sam@mendozajonas.com>
Mon, 8 Feb 2016 04:27:41 +0000 (15:27 +1100)
commit01e104dfb79a09bc28f8c5fb65bfe44596c25161
tree74d27b78669f4546537d105080bb20302dde6a2c
parentb3d51f6ec5d077e6a2068fde0631074a7302b1da
discover/grub2: Fix behavior of save_env -f

Currently, "save_env -f" in the GRUB2 parser only works with three
arguments, which means only commands of the form "save_env -f <path>"
that save *no* environment variables are allowed.

Allow "save_env -f <path> [<var>]*", making "save_env -f" useful.

Tested:
 Unit test test-grub2-save-env-dash-f tests this change, and the
 remaining unit tests still pass.

Signed-off-by: Alan Dunn <amdunn@google.com>
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
discover/grub2/env.c
test/parser/Makefile.am
test/parser/test-grub2-save-env-dash-f.c [new file with mode: 0644]