* grub-core/kern/emu/getroot.c (grub_util_get_grub_dev): Check md/%s
names. Reported by: David Pravec.
This commit is contained in:
parent
446fa40081
commit
ebc71d284c
2 changed files with 15 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-01-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/kern/emu/getroot.c (grub_util_get_grub_dev): Check md/%s
|
||||
names.
|
||||
Reported by: David Pravec.
|
||||
|
||||
2011-01-04 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/disk/i386/pc/biosdisk.c (GRUB_MOD_INIT): Workaround buggy
|
||||
|
|
|
@ -794,11 +794,18 @@ grub_util_get_grub_dev (const char *os_dev)
|
|||
#ifdef __linux__
|
||||
{
|
||||
char *mdadm_name = get_mdadm_name (os_dev);
|
||||
struct stat st;
|
||||
|
||||
if (mdadm_name)
|
||||
{
|
||||
free (grub_dev);
|
||||
grub_dev = xasprintf ("md/%s", mdadm_name);
|
||||
char *newname;
|
||||
newname = xasprintf ("/dev/md/%s", mdadm_name);
|
||||
if (stat (newname, &st) == 0)
|
||||
{
|
||||
free (grub_dev);
|
||||
grub_dev = xasprintf ("md/%s", mdadm_name);
|
||||
}
|
||||
free (newname);
|
||||
free (mdadm_name);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue