use fw_path prefix when fallback searching for grub config
authorMark Salter <msalter@redhat.com>
Mon, 9 Jan 2023 23:30:39 +0000 (18:30 -0500)
committerFelix Zielcke <fzielcke@z-51.de>
Mon, 15 Jul 2024 15:05:20 +0000 (17:05 +0200)
commit45be1ee8c70ea577508c82aaf92a515573a99695
treee7a7582bc040de35aa03a2197184ffb0e1e77ec0
parent937c2ddea689d4a309e68600fd5b09f394161dfa
use fw_path prefix when fallback searching for grub config

When PXE booting via UEFI firmware, grub was searching for grub.cfg in
the fw_path directory where the grub application was found.  If that
didn't exist, a fallback search would look for config file names based
on MAC and IP address.  However, the search would look in the prefix
directory which may not be the same fw_path.  This patch changes that
behavior to use the fw_path directory for the fallback search.  Only if
fw_path is NULL will the prefix directory be searched.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Gbp-Pq: Topic network
Gbp-Pq: Name use-fw_path-prefix-when-fallback-searching-for-grub-config.patch
grub-core/normal/main.c