From: Vladimir Serbinenko <phcoder@gmail.com>
To: grub-devel@gnu.org
Cc: Vladimir Serbinenko <phcoder@gmail.com>
Subject: [PATCH 2/2] emu/linux: Fix determination of program name
Date: Mon, 17 Jun 2024 15:56:31 +0300 [thread overview]
Message-ID: <20240617125631.10861-2-phcoder@gmail.com> (raw)
In-Reply-To: <20240617125631.10861-1-phcoder@gmail.com>
Current code works only if package matches binary name transformation rules.
It's often true but is no waz guaranteed
Fixes bug #64410
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
grub-core/loader/emu/linux.c | 3 ++-
include/grub/emu/misc.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/grub-core/loader/emu/linux.c b/grub-core/loader/emu/linux.c
index 7de3f7f86..2a55b8387 100644
--- a/grub-core/loader/emu/linux.c
+++ b/grub-core/loader/emu/linux.c
@@ -68,7 +68,8 @@ 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");
diff --git a/include/grub/emu/misc.h b/include/grub/emu/misc.h
index 01056954b..fa959ebe7 100644
--- a/include/grub/emu/misc.h
+++ b/include/grub/emu/misc.h
@@ -31,7 +31,7 @@
#include <grub/util/misc.h>
extern int verbosity;
-extern const char *program_name;
+extern const char *EXPORT_VAR(program_name);
void grub_init_all (void);
void grub_fini_all (void);
--
2.39.2
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2024-06-17 12:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 12:56 [PATCH 1/2] cryptodisk: Fix translatable message Vladimir Serbinenko
2024-06-17 12:56 ` Vladimir Serbinenko [this message]
2024-06-20 11:44 ` [PATCH 2/2] emu/linux: Fix determination of program name Daniel Kiper
2024-06-20 11:43 ` [PATCH 1/2] cryptodisk: Fix translatable message Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240617125631.10861-2-phcoder@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.