From: Spencer Michaels Date: Wed, 6 Nov 2019 05:23:40 +0000 (-0800) Subject: boot: Make EFISTUB IDs use binaries' filenames. X-Git-Tag: v245-rc1~313^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fa23ab646a02c7299ff8257cb104ad8f83eda70;p=thirdparty%2Fsystemd.git 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. --- 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;