Handle empty dir passed to grub_find_root_device_from_mountinfo; fixes grub-mkrelpath on btrfs subvolumes.

This commit is contained in:
Colin Watson 2011-02-04 13:33:16 +00:00
parent bd1a414714
commit 8c2c4ff2f5

View file

@ -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;