efi: cache test results of boolean EFI state functions
authorLennart Poettering <lennart@poettering.net>
Tue, 28 Apr 2020 21:33:46 +0000 (23:33 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 30 Apr 2020 06:10:31 +0000 (08:10 +0200)
commitf46ba93944aac3f05211e0d630cdf84955eba2d8
tree408c1e1b7f089b63ea8a73d0f82152b7a7c95bf4
parentd47df15b11b139ea5848e9dbf14efbed5dc0be2e
efi: cache test results of boolean EFI state functions

EFI variable access is nowadays subject to rate limiting by the kernel.
Thus, let's cache the results of checking them, in order to minimize how
often we access them.

Fixes: #14828
src/basic/efivars.c