1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-26 03:22:00 +03:00

Merge pull request #21065 from keszybz/efi-warnings

Clean up unused variables in efi code
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-10-21 08:33:08 +02:00 committed by GitHub
commit 97c373c7de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,6 @@ EFI_STATUS load_drivers(
_cleanup_(FileHandleClosep) EFI_FILE_HANDLE drivers_dir = NULL;
_cleanup_freepool_ EFI_FILE_INFO *dirent = NULL;
_cleanup_freepool_ EFI_DEVICE_PATH *path = NULL;
UINTN dirent_size = 0, n_succeeded = 0;
EFI_STATUS err;
@ -96,8 +95,6 @@ EFI_STATUS load_drivers(
return log_error_status_stall(err, L"Failed to open \\EFI\\systemd\\drivers: %r", err);
for (;;) {
_cleanup_freepool_ CHAR16 *d = NULL;
err = readdir_harder(drivers_dir, &dirent, &dirent_size);
if (EFI_ERROR(err))
return log_error_status_stall(err, L"Failed to read extra directory of loaded image: %r", err);

View File

@ -138,6 +138,9 @@ EFI_STATUS linux_exec(
assert(linux_buffer);
assert(initrd_buffer || initrd_length == 0);
if (linux_length < sizeof(struct boot_params))
return EFI_LOAD_ERROR;
image_params = (const struct boot_params *) linux_buffer;
if (image_params->hdr.boot_flag != 0xAA55 ||