* util/getroot.c (grub_find_root_devices_from_mountinfo): Handle btrfs
subvolumes.
This commit is contained in:
parent
982f1909cf
commit
d1718e7d2b
2 changed files with 20 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2012-06-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/getroot.c (grub_find_root_devices_from_mountinfo): Handle btrfs
|
||||||
|
subvolumes.
|
||||||
|
|
||||||
2012-06-22 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-06-22 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Implement flow control for http.
|
Implement flow control for http.
|
||||||
|
|
|
@ -651,7 +651,21 @@ grub_find_root_devices_from_mountinfo (const char *dir, char **relroot)
|
||||||
{
|
{
|
||||||
ret = grub_find_root_devices_from_btrfs (dir);
|
ret = grub_find_root_devices_from_btrfs (dir);
|
||||||
if (relroot)
|
if (relroot)
|
||||||
*relroot = strdup (entries[i].enc_root);
|
{
|
||||||
|
char *ptr;
|
||||||
|
*relroot = xmalloc (strlen (entries[i].enc_root) +
|
||||||
|
2 + strlen (dir));
|
||||||
|
ptr = stpcpy (*relroot, entries[i].enc_root);
|
||||||
|
if (strlen (dir) > strlen (entries[i].enc_path))
|
||||||
|
{
|
||||||
|
while (ptr > *relroot && *(ptr - 1) == '/')
|
||||||
|
ptr--;
|
||||||
|
if (dir[strlen (entries[i].enc_path)] != '/')
|
||||||
|
*ptr++ = '/';
|
||||||
|
ptr = stpcpy (ptr, dir + strlen (entries[i].enc_path));
|
||||||
|
}
|
||||||
|
*ptr = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!ret)
|
if (!ret)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue