Projects
Eulaceura:Factory
grub2
_service:obs_scm:grub2-getroot-scan-disk-pv.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:grub2-getroot-scan-disk-pv.patch of Package grub2
From: Michael Chang <mchang@suse.com> Subject: Fix grub2-mkconfig warning when disk is LVM PV References: bsc#1071239 When a disk device was found in grub_util_biosdisk_get_grub_dev, its grub hostdisk device name just returned. Since the disk could also be used as PV disk, use grub_util_get_ldm to kick scanning of on disk metadata and adding it to VG array. --- Index: grub-2.02/util/getroot.c =================================================================== --- grub-2.02.orig/util/getroot.c +++ grub-2.02/util/getroot.c @@ -272,8 +272,28 @@ grub_util_biosdisk_get_grub_dev (const c grub_util_info ("%s is a parent of %s", sys_disk, os_dev); if (!is_part) { +#if defined(__APPLE__) free (sys_disk); return make_device_name (drive); +#else + char *name, *ldm_name; + grub_disk_t disk; + + free (sys_disk); + name = make_device_name (drive); + disk = grub_disk_open (name); + if (!disk) + return name; + ldm_name = grub_util_get_ldm (disk, 0); + if (ldm_name) + { + grub_disk_close (disk); + grub_free (name); + return ldm_name; + } + grub_disk_close (disk); + return name; +#endif } free (sys_disk);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2