]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Allow reading the UEFI variable size
authormw <mw@FreeBSD.org>
Fri, 8 Feb 2019 14:56:28 +0000 (14:56 +0000)
committermw <mw@FreeBSD.org>
Fri, 8 Feb 2019 14:56:28 +0000 (14:56 +0000)
commit15fd10a41e549d8e113ea8e61e4d1b6615b39a9e
tree1763a8fc58e52e135d26b99f1c54971b6c00459b
parentd983f80ab41525720c59807e8667d4b27e8a27e0
Allow reading the UEFI variable size

When loading bigger variables form UEFI it is necessary to know their
size beforehand, so that an appropriate amount of memory can be
allocated. The easiest way to do this is to try to read the variable
with buffer size equal 0, expecting EFI_BUFFER_TOO_SMALL error to be
returned. Allow such possible approach in efi_getenv routine.

Extracted from a bigger patch as suggested by imp.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
stand/efi/libefi/efienv.c