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)
committerPeter Michael Green <plugwash@raspbian.org>
Sun, 28 Jul 2024 22:42:11 +0000 (22:42 +0000)
commit68f56ce4f37162f897d86e6680dba0c9093de7f7
treec29af917733ebb38271243f50507ca4104181a35
parente6eaa519c2f3b8b2fbaa43909578d069b883deb3
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