* 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>
|
||||
|
||||
ZFS zlib support
|
||||
|
|
|
@ -620,11 +620,13 @@ grub_guess_root_device (const char *dir)
|
|||
int root = (strcmp (os_dev, "/dev/root") == 0);
|
||||
if (!dm && !root)
|
||||
return os_dev;
|
||||
if (stat (os_dev, &st) < 0)
|
||||
grub_util_error ("cannot stat `%s'", os_dev);
|
||||
if (stat (os_dev, &st) >= 0)
|
||||
{
|
||||
free (os_dev);
|
||||
dev = st.st_rdev;
|
||||
return grub_find_device (dm ? "/dev/mapper" : "/dev", dev);
|
||||
}
|
||||
free (os_dev);
|
||||
dev = st.st_rdev;
|
||||
return grub_find_device (dm ? "/dev/mapper" : "/dev", dev);
|
||||
}
|
||||
|
||||
if (stat (dir, &st) < 0)
|
||||
|
|
Loading…
Reference in a new issue