From 7fa23ab646a02c7299ff8257cb104ad8f83eda70 Mon Sep 17 00:00:00 2001 From: Spencer Michaels Date: Tue, 5 Nov 2019 21:23:40 -0800 Subject: [PATCH] boot: Make EFISTUB IDs use binaries' filenames. Change config_entry_add_linux() so that Linux EFISTUB entries' ids are simply the binaries' filenames, as is already the case with loader configs. This guarantees that EFISTUB binaries' IDs are mutually unique. --- src/boot/efi/boot.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index 849c3c63b6a..217dfbad164 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -1965,12 +1965,11 @@ static VOID config_entry_add_linux( } if (os_name && os_id && (os_version || os_build)) { - _cleanup_freepool_ CHAR16 *conf = NULL, *path = NULL; + _cleanup_freepool_ CHAR16 *path = NULL; - conf = PoolPrint(L"%s-%s", os_id, os_version ? : os_build); path = PoolPrint(L"\\EFI\\Linux\\%s", f->FileName); - entry = config_entry_add_loader(config, device, LOADER_LINUX, conf, 'l', os_name, path); + entry = config_entry_add_loader(config, device, LOADER_LINUX, f->FileName, 'l', os_name, path); FreePool(content); content = NULL; -- 2.47.3