mirror of
https://codeberg.org/canoeboot/cbmk.git
synced 2025-07-08 06:27:33 +01:00

NOTE: gfxterm_menu module removed, because of this change by upstream: commit ca2a91f43bf6e1df23a07c295534f871ddf2d401 Author: Glenn Washburn <development@efficientek.com> Date: Mon May 5 16:11:36 2025 -0500 tests: Disable gfxterm_menu and cmdline_cat tests This brings in the following changes from upstream: * a68a7dece loader/i386/pc/linux: Fix resource leak * de80acf36 loader/efi/linux: Unload previous Linux kernel/initrd before updating kernel size * 249db11d8 loader/efi/linux: Correctly terminate load_options member * f3b339af1 loader/efi/linux: Use sizeof() instead of constant * c2b2e0dcf loader/efi/linux: Use proper type for len variable * de4e8e2aa loader/efi/linux: Do not pass excessive size for source string * 8c8f96664 loader/efi/linux: Remove useless assignment * 8ebf155af include/grub/charset.h: Update documentation * 2f2ed28d5 Revert "lzma: Make sure we don't dereference past array" * 2539ede82 tests/util/grub-shell: Correct netboot and file_filter test failure * 8c2d4e64f normal/charset: Fix underflow and overflow in loop init * ba8eadde6 dl: Provide a fake grub_dl_set_persistent() and grub_dl_is_persistent() for the emu target * 409e72ced util/grub-protect: Correct uninit "err" variable * 5eca564b1 gnulib: Bring back the fix for resolving unused variable issue * ac1512b87 gnulib: Add patch to allow GRUB w/GCC-15 compile * db506b3b8 gnulib/regexec: Fix resource leak * bba7dd736 gnulib/regcomp: Fix resource leak * 91cb7ff6b tests/tpm2_key_protector_test: Add tests for SHA-384 PCR bank * 451e227e5 tpm2_key_protector: Dump the PCR bank for key unsealing * 11caacdb2 util/grub-protect: Fix the hash algorithm of PCR digest * ce23919ca build: Add new header files to dist to allow building from tar * e3b15bafd build: Remove extra_deps.lst from EXTRA_DIST * 40e261b89 lib/LzmaEnc: Validate "len" before subtracting * 86e8f2c4b osdep/unix/hostdisk: Fix signed integer overflow * 438f05581 disk/luks2: Add attempting to decrypt message to align with luks and geli modules * 20e6d0c4a osdep/linux/getroot: Detect DDF container similar to IMSM * b71bc0f8b fs/fshelp: Avoid possible NULL pointer deference * 272ff81cb fs/ntfs: Correct possible infinite loops/hangs * 8c95307a0 fs/ntfs: Correct possible access violations * 06914b614 fs/ntfs: Correct attribute vs attribute list validation * 0e1762c8a fs/ntfs: Correct regression with run list calculation * be303f8c1 lib/envblk: Ignore empty new lines while parsing env files * 34bd00ee2 fs/zfs: Fix another memory leak in ZFS code * ca2a91f43 tests: Disable gfxterm_menu and cmdline_cat tests Signed-off-by: Leah Rowe <leah@libreboot.org>
102 lines
3.6 KiB
Diff
102 lines
3.6 KiB
Diff
From d0345db429be8089145e0c072db9ac8db0b644bd Mon Sep 17 00:00:00 2001
|
|
From: Leah Rowe <leah@libreboot.org>
|
|
Date: Sun, 5 Nov 2023 16:14:58 +0000
|
|
Subject: [PATCH 11/14] don't print missing prefix errors on the screen
|
|
|
|
we do actually set the prefix. this patch modifies
|
|
grub to still set grub_errno and return accordingly,
|
|
so the behaviour is otherwise identical, but it will
|
|
no longer print a warning message on the screen.
|
|
|
|
Signed-off-by: Leah Rowe <leah@libreboot.org>
|
|
---
|
|
grub-core/commands/keylayouts.c | 2 +-
|
|
grub-core/commands/loadenv.c | 2 +-
|
|
grub-core/commands/nativedisk.c | 2 +-
|
|
grub-core/efiemu/main.c | 3 +--
|
|
grub-core/font/font.c | 2 +-
|
|
grub-core/kern/dl.c | 2 +-
|
|
6 files changed, 6 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/grub-core/commands/keylayouts.c b/grub-core/commands/keylayouts.c
|
|
index 445fa0601..00bcf7025 100644
|
|
--- a/grub-core/commands/keylayouts.c
|
|
+++ b/grub-core/commands/keylayouts.c
|
|
@@ -211,7 +211,7 @@ grub_cmd_keymap (struct grub_command *cmd __attribute__ ((unused)),
|
|
{
|
|
const char *prefix = grub_env_get ("prefix");
|
|
if (!prefix)
|
|
- return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("variable `%s' isn't set"), "prefix");
|
|
+ return (grub_errno = GRUB_ERR_BAD_ARGUMENT);
|
|
filename = grub_xasprintf ("%s/layouts/%s.gkb", prefix, argv[0]);
|
|
if (!filename)
|
|
return grub_errno;
|
|
diff --git a/grub-core/commands/loadenv.c b/grub-core/commands/loadenv.c
|
|
index 166445849..699b39bfa 100644
|
|
--- a/grub-core/commands/loadenv.c
|
|
+++ b/grub-core/commands/loadenv.c
|
|
@@ -58,7 +58,7 @@ open_envblk_file (char *filename,
|
|
prefix = grub_env_get ("prefix");
|
|
if (! prefix)
|
|
{
|
|
- grub_error (GRUB_ERR_FILE_NOT_FOUND, N_("variable `%s' isn't set"), "prefix");
|
|
+ grub_errno = GRUB_ERR_FILE_NOT_FOUND;
|
|
return 0;
|
|
}
|
|
|
|
diff --git a/grub-core/commands/nativedisk.c b/grub-core/commands/nativedisk.c
|
|
index 580c8d3b0..6806bff9c 100644
|
|
--- a/grub-core/commands/nativedisk.c
|
|
+++ b/grub-core/commands/nativedisk.c
|
|
@@ -186,7 +186,7 @@ grub_cmd_nativedisk (grub_command_t cmd __attribute__ ((unused)),
|
|
prefix = grub_env_get ("prefix");
|
|
|
|
if (! prefix)
|
|
- return grub_error (GRUB_ERR_FILE_NOT_FOUND, N_("variable `%s' isn't set"), "prefix");
|
|
+ return (grub_errno = GRUB_ERR_FILE_NOT_FOUND);
|
|
|
|
if (prefix)
|
|
path_prefix = (prefix[0] == '(') ? grub_strchr (prefix, ')') : NULL;
|
|
diff --git a/grub-core/efiemu/main.c b/grub-core/efiemu/main.c
|
|
index e7037f4ed..e5d4dbff1 100644
|
|
--- a/grub-core/efiemu/main.c
|
|
+++ b/grub-core/efiemu/main.c
|
|
@@ -231,8 +231,7 @@ grub_efiemu_autocore (void)
|
|
prefix = grub_env_get ("prefix");
|
|
|
|
if (! prefix)
|
|
- return grub_error (GRUB_ERR_FILE_NOT_FOUND,
|
|
- N_("variable `%s' isn't set"), "prefix");
|
|
+ return (grub_errno = GRUB_ERR_FILE_NOT_FOUND);
|
|
|
|
suffix = grub_efiemu_get_default_core_name ();
|
|
|
|
diff --git a/grub-core/font/font.c b/grub-core/font/font.c
|
|
index 18de52562..2a0fea6c8 100644
|
|
--- a/grub-core/font/font.c
|
|
+++ b/grub-core/font/font.c
|
|
@@ -461,7 +461,7 @@ grub_font_load (const char *filename)
|
|
|
|
if (!prefix)
|
|
{
|
|
- grub_error (GRUB_ERR_FILE_NOT_FOUND, N_("variable `%s' isn't set"), "prefix");
|
|
+ grub_errno = GRUB_ERR_FILE_NOT_FOUND;
|
|
goto fail;
|
|
}
|
|
file = try_open_from_prefix (prefix, filename);
|
|
diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
|
|
index 4a3be8568..6ae3d73f8 100644
|
|
--- a/grub-core/kern/dl.c
|
|
+++ b/grub-core/kern/dl.c
|
|
@@ -881,7 +881,7 @@ grub_dl_load (const char *name)
|
|
return 0;
|
|
|
|
if (! grub_dl_dir) {
|
|
- grub_error (GRUB_ERR_FILE_NOT_FOUND, N_("variable `%s' isn't set"), "prefix");
|
|
+ grub_errno = GRUB_ERR_FILE_NOT_FOUND;
|
|
return 0;
|
|
}
|
|
|
|
--
|
|
2.39.5
|
|
|