Handle empty dir passed to grub_find_root_device_from_mountinfo; fixes grub-mkrelpath on btrfs subvolumes.
This commit is contained in:
parent
bd1a414714
commit
8c2c4ff2f5
1 changed files with 2 additions and 0 deletions
|
@ -111,6 +111,8 @@ grub_find_root_device_from_mountinfo (const char *dir, char **relroot)
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
|
|
||||||
|
if (! *dir)
|
||||||
|
dir = "/";
|
||||||
if (relroot)
|
if (relroot)
|
||||||
*relroot = NULL;
|
*relroot = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue