diff --git a/src/boot/bootctl-status.c b/src/boot/bootctl-status.c index 0f2e9204b7..65f351031d 100644 --- a/src/boot/bootctl-status.c +++ b/src/boot/bootctl-status.c @@ -43,11 +43,12 @@ static int boot_config_load_and_select( _cleanup_strv_free_ char **efi_entries = NULL; r = efi_loader_get_entries(&efi_entries); - if (r == -ENOENT || ERRNO_IS_NOT_SUPPORTED(r)) - log_debug_errno(r, "Boot loader reported no entries."); - else if (r < 0) - log_warning_errno(r, "Failed to determine entries reported by boot loader, ignoring: %m"); - else + if (r < 0) { + if (r == -ENOENT || ERRNO_IS_NOT_SUPPORTED(r)) + log_debug_errno(r, "Boot loader reported no entries."); + else + log_warning_errno(r, "Failed to determine entries reported by boot loader, ignoring: %m"); + } else (void) boot_config_augment_from_loader(config, efi_entries, /* only_auto= */ false); }