mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
sd-boot: Fix xbootldr detection
The broken crc32 calculation was a copy pasta error introduced in
87167331c9 and luckily has never been
shipped yet.
This commit is contained in:
committed by
Lennart Poettering
parent
bcbc3e81d3
commit
423523e063
@@ -1321,7 +1321,6 @@ static VOID config_entry_add_from_file(
|
||||
assert(path);
|
||||
assert(file);
|
||||
assert(content);
|
||||
assert(loaded_image_path);
|
||||
|
||||
entry = AllocatePool(sizeof(ConfigEntry));
|
||||
|
||||
@@ -1509,7 +1508,6 @@ static VOID config_load_entries(
|
||||
assert(config);
|
||||
assert(device);
|
||||
assert(root_dir);
|
||||
assert(loaded_image_path);
|
||||
|
||||
err = open_directory(root_dir, L"\\loader\\entries", &entries_dir);
|
||||
if (EFI_ERROR(err))
|
||||
|
||||
@@ -142,7 +142,7 @@ EFI_STATUS xbootldr_open(EFI_HANDLE *device, EFI_HANDLE *ret_device, EFI_FILE **
|
||||
continue;
|
||||
|
||||
/* Calculate CRC of entries array, too */
|
||||
r = BS->CalculateCrc32(&entries, sz, &crc32);
|
||||
r = BS->CalculateCrc32(entries, sz, &crc32);
|
||||
if (EFI_ERROR(r) || crc32 != h->PartitionEntryArrayCRC32)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user