* grub-core/kern/emu/getroot.c (grub_guess_root_device): Revert to
old method if mountinfo would return /dev/root and /dev/root doesn't exist.
This commit is contained in:
parent
290766fb77
commit
bc09e1a238
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2011-06-24 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/emu/getroot.c (grub_guess_root_device): Revert to
|
||||||
|
old method if mountinfo would return /dev/root and /dev/root doesn't
|
||||||
|
exist.
|
||||||
|
|
||||||
2011-06-24 Vladimir Serbinenko <phcoder@gmail.com>
|
2011-06-24 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
ZFS zlib support
|
ZFS zlib support
|
||||||
|
|
|
@ -620,12 +620,14 @@ grub_guess_root_device (const char *dir)
|
||||||
int root = (strcmp (os_dev, "/dev/root") == 0);
|
int root = (strcmp (os_dev, "/dev/root") == 0);
|
||||||
if (!dm && !root)
|
if (!dm && !root)
|
||||||
return os_dev;
|
return os_dev;
|
||||||
if (stat (os_dev, &st) < 0)
|
if (stat (os_dev, &st) >= 0)
|
||||||
grub_util_error ("cannot stat `%s'", os_dev);
|
{
|
||||||
free (os_dev);
|
free (os_dev);
|
||||||
dev = st.st_rdev;
|
dev = st.st_rdev;
|
||||||
return grub_find_device (dm ? "/dev/mapper" : "/dev", dev);
|
return grub_find_device (dm ? "/dev/mapper" : "/dev", dev);
|
||||||
}
|
}
|
||||||
|
free (os_dev);
|
||||||
|
}
|
||||||
|
|
||||||
if (stat (dir, &st) < 0)
|
if (stat (dir, &st) < 0)
|
||||||
grub_util_error ("cannot stat `%s'", dir);
|
grub_util_error ("cannot stat `%s'", dir);
|
||||||
|
|
Loading…
Reference in a new issue