Ignore the hypervisor's reboot memory block device. Newer sun4v hardware contain a block device for the hypervisor. This block device should not be used by anyone else.
Signed-off-by: Eric Snowberg <[email protected]> --- grub-core/disk/ieee1275/ofdisk.c | 3 +++ grub-core/kern/ieee1275/cmain.c | 1 + include/grub/ieee1275/ieee1275.h | 2 ++ 3 files changed, 6 insertions(+), 0 deletions(-) diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c index 17d082b..5405be8 100644 --- a/grub-core/disk/ieee1275/ofdisk.c +++ b/grub-core/disk/ieee1275/ofdisk.c @@ -524,6 +524,9 @@ dev_iterate (const struct grub_ieee1275_devalias *alias) if (!grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_TREE_SCANNING_FOR_DISKS) && grub_strcmp (alias->type, "block") == 0) { + if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_IGNORE_REBOOT_DEV) + && grub_strstr (alias->path, "reboot-memory")) + return; dev_iterate_real (alias->path, alias->path); return; } diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c index 59271ae..844862f 100644 --- a/grub-core/kern/ieee1275/cmain.c +++ b/grub-core/kern/ieee1275/cmain.c @@ -113,6 +113,7 @@ grub_ieee1275_find_options (void) { grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CACHE_OPEN); grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_VALIDATE_DEV_ALIASES); + grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_IGNORE_REBOOT_DEV); } for (ptr = tmp; ptr - tmp < actual; ptr += grub_strlen (ptr) + 1) diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h index 7644956..fdd123d 100644 --- a/include/grub/ieee1275/ieee1275.h +++ b/include/grub/ieee1275/ieee1275.h @@ -150,6 +150,8 @@ enum grub_ieee1275_flag GRUB_IEEE1275_FLAG_CACHE_OPEN, GRUB_IEEE1275_FLAG_VALIDATE_DEV_ALIASES, + + GRUB_IEEE1275_FLAG_IGNORE_REBOOT_DEV, }; extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag); -- 1.7.1 _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
