bootctl: handle if LoaderSystemToken is invalid for some reason
This points to some firmware issue, but we should still be able to correct things if this happens. Hence log about this and fix it. Fixes: #17041
This commit is contained in:
parent
0c94a31464
commit
ad0b610b0c
|
@ -1454,7 +1454,9 @@ static int install_random_seed(const char *esp) {
|
|||
}
|
||||
|
||||
r = efi_get_variable(EFI_VENDOR_LOADER, "LoaderSystemToken", NULL, NULL, &token_size);
|
||||
if (r < 0) {
|
||||
if (r == -ENODATA)
|
||||
log_debug_errno(r, "LoaderSystemToken EFI variable is invalid (too short?), replacing.");
|
||||
else if (r < 0) {
|
||||
if (r != -ENOENT)
|
||||
return log_error_errno(r, "Failed to test system token validity: %m");
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue