blsuki: Check for mounted /boot in emu

Irritatingly, BLS defines paths relative to the mountpoint of the
filesystem which contains its snippets, not / or any other fixed
location. So grub-emu needs to know whether /boot is a separate
filesystem from / and conditionally prepend a path.

Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Robbie Harwood authored and Daniel Kiper committed 2025-09-04 14:37:20 +02:00
1 parent 51b9601320
commit 5190df8510
5 files changed
+91 -9

No files matched your search

+8
View File
@@ -131,6 +131,7 @@ struct mountinfo_entry
char fstype[ESCAPED_PATH_MAX + 1], device[ESCAPED_PATH_MAX + 1];
};
#ifdef GRUB_UTIL
static char **
grub_util_raid_getmembers (const char *name, int bootable)
{
@@ -191,6 +192,7 @@ grub_util_raid_getmembers (const char *name, int bootable)
return devicelist;
}
#endif
/* Statting something on a btrfs filesystem always returns a virtual device
major/minor pair rather than the real underlying device, because btrfs
@@ -579,6 +581,7 @@ out:
return ret;
}
#ifdef GRUB_UTIL
static char *
get_mdadm_uuid (const char *os_dev)
{
@@ -636,6 +639,7 @@ out:
return name;
}
#endif
static int
grub_util_is_imsm_or_ddf (const char *os_dev)
@@ -975,6 +979,7 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,
return path;
}
#ifdef GRUB_UTIL
static char *
grub_util_get_raid_grub_dev (const char *os_dev)
{
@@ -1077,6 +1082,7 @@ grub_util_get_raid_grub_dev (const char *os_dev)
}
return grub_dev;
}
#endif
enum grub_dev_abstraction_types
grub_util_get_dev_abstraction_os (const char *os_dev)
@@ -1093,6 +1099,7 @@ grub_util_get_dev_abstraction_os (const char *os_dev)
return GRUB_DEV_ABSTRACTION_NONE;
}
#ifdef GRUB_UTIL
int
grub_util_pull_device_os (const char *os_dev,
enum grub_dev_abstraction_types ab)
@@ -1149,6 +1156,7 @@ grub_util_get_grub_dev_os (const char *os_dev)
return grub_dev;
}
#endif
char *
grub_make_system_path_relative_to_its_root_os (const char *path)
+3 -1
View File
@@ -16,8 +16,8 @@
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <config-util.h>
#include <config.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -566,6 +566,7 @@ grub_guess_root_devices (const char *dir_in)
#endif
#ifdef GRUB_UTIL
void
grub_util_pull_lvm_by_command (const char *os_dev)
{
@@ -662,6 +663,7 @@ out:
free (buf);
free (vgid);
}
#endif
/* ZFS has similar problems to those of btrfs (see above). */
void