loader.efi environment related cleanups
authortsoome <tsoome@FreeBSD.org>
Wed, 1 Feb 2017 08:46:59 +0000 (08:46 +0000)
committertsoome <tsoome@FreeBSD.org>
Wed, 1 Feb 2017 08:46:59 +0000 (08:46 +0000)
commit040b327347f7e3ad665737bc8ac0d9801c828022
tree3965dbe2c6d3536e71e43de8a2c09198e177b58b
parent4fd9bb8b9b75ee6885d3bcba07067ba469b7c70e
loader.efi environment related cleanups

Since we have dedicated libefi/env.c file for variable support, the following
changes are done:

Simple cstyle changes in env.c
Moved efi variable related commands from loader/main.c to libefi/env.c
Did create function to set "efi-version" environment variable in env.c.

This function does serve two purposes: for first a  small clean up of the
loader main(), and for second, it does replace the otherwise unused
efi_variable_support hack.
A bit of cleanup of ficl backend functions. The TEST_MAIN has no meaning,
and removed few memory leaks.

The forth code is updated to use "efi-version" variable, instead of ficl
environment check.

Reviewed by: imp
Approved by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D9165
sys/boot/efi/include/efilib.h
sys/boot/efi/libefi/Makefile
sys/boot/efi/libefi/env.c
sys/boot/efi/libefi/wchar.c [copied from sys/boot/efi/include/efilib.h with 50% similarity]
sys/boot/efi/loader/main.c
sys/boot/forth/loader.4th