grub2/0126-Only-attempt-to-scan-different-BLS-directories-on-EF.patch
Javier Martinez Canillas 1f092caba7
Drop two efinet patches that were causing issues and a bunch of other fixes
Add comments and revert logic changes in 01_fallback_counting
Remove quotes when reading ID value from /etc/os-release
  Related: rhbz#1650706
blscfg: expand grub_users before passing to grub_normal_add_menu_entry()
  Resolves: rhbz#1650706
Drop buggy downstream patch "efinet: retransmit if our device is busy"
  Resolves: rhbz#1649048
Make the menu entry users option argument to be optional
  Related: rhbz#1652434
10_linux_bls: add missing menu entries options
  Resolves: rhbz#1652434
Drop "Be more aggro about actually using the *configured* network device."
  Resolves: rhbz#1654388
Fix menu entry selection based on title
  Resolves: rhbz#1654936

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-12-01 03:28:36 +01:00

46 lines
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm@redhat.com>
Date: Tue, 3 Apr 2018 15:42:47 +0200
Subject: [PATCH] Only attempt to scan different BLS directories on EFI
machines
Current BLS support attempted to scan for BLS directories, but this only
makes sense on EFI, where BLS fragments are in /loader/$vendor/entries.
For BIOS, only either the default /loader/entries path should be scanned
or the BLS directory defined in the blsdir GRUB 2 environment variable.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
grub-core/commands/blscfg.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
index e0b65534af4..e775c6b8794 100644
--- a/grub-core/commands/blscfg.c
+++ b/grub-core/commands/blscfg.c
@@ -676,8 +676,8 @@ static int find_entry (const char *filename,
const char *devid = grub_env_get ("boot");
grub_dprintf("blscfg", "%s got here\n", __func__);
- if (!grub_strcmp (filename, ".") ||
- !grub_strcmp (filename, ".."))
+ if (filename && (!grub_strcmp (filename, ".") ||
+ !grub_strcmp (filename, "..")))
return 0;
if (info->platform == PLATFORM_EFI && !grub_strcasecmp (filename, "boot"))
@@ -872,11 +872,10 @@ grub_cmd_blscfg (grub_extcmd_context_t ctxt UNUSED,
info.platform = PLATFORM_EMU;
grub_dprintf ("blscfg", "scanning %s%s\n", GRUB_BOOT_DEVICE,
GRUB_BLS_CONFIG_PATH);
- r = fs->dir (dev, "/boot/loader/",
- find_entry, &info);
+ find_entry(NULL, NULL, &info);
#else
grub_dprintf ("blscfg", "scanning %s\n", GRUB_BLS_CONFIG_PATH);
- r = fs->dir (dev, "/", find_entry, &info);
+ find_entry(NULL, NULL, &info);
#endif
finish: