efivars: drop unused "optimization"

This was added in c242a08279, and AFAICT, the
code was never exercised, not even in the tests. With this chunk gone, if
anyone ever calls the function without any output params, we'll do open + fstat
instead of access, which will work just fine too.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2025-09-17 09:45:47 +02:00
parent 4b97478979
commit 4125e0c3db
-9
View File
@@ -38,15 +38,6 @@ int efi_get_variable(
const char *p = strjoina("/sys/firmware/efi/efivars/", variable);
if (!ret_value && !ret_size && !ret_attribute) {
/* If caller is not interested in anything, just check if the variable exists and is
* readable. */
if (access(p, R_OK) < 0)
return -errno;
return 0;
}
if (DEBUG_LOGGING) {
log_debug("Reading EFI variable %s.", p);
begin = now(CLOCK_MONOTONIC);