]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Make EFISTUB IDs use binaries' filenames.
authorSpencer Michaels <sxmichaels@gmail.com>
Wed, 6 Nov 2019 05:23:40 +0000 (21:23 -0800)
committerSpencer Michaels <sxmichaels@gmail.com>
Tue, 19 Nov 2019 06:59:44 +0000 (22:59 -0800)
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

index 849c3c63b6a984a951a6ef684e5c0029b8257924..217dfbad164b2f91baed57a9c3393f8a5f663c90 100644 (file)
@@ -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;