loader/emu/linux: Fix determination of program name

Current code works only if package matches binary name transformation rules.
It's often true but is not guaranteed.

Fixes: https://savannah.gnu.org/bugs/?64410

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Vladimir Serbinenko authored and Daniel Kiper committed 2024-06-20 19:11:48 +02:00
1 parent 828717833f
commit f171122f03
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -68,7 +68,7 @@ grub_linux_boot (void)
}
if (kexecute < 1)
grub_fatal (N_("use '"PACKAGE"-emu --kexec' to force a system restart"));
grub_fatal (N_("use '%s %s' to force a system restart"), program_name, "--kexec");
grub_dprintf ("linux", "Performing 'systemctl kexec' (%s) ",
(kexecute==1) ? "do-or-die" : "just-in-case");