devmapper/getroot: use makedev instead of direct shift

Fixes device detection with large number of devices.

Reported by Tim Wallberg <twalberg@comcast.net>
This commit is contained in:
Andrei Borzenkov 2015-11-07 09:46:46 +03:00
parent 1018e91dce
commit 349a381df0

View file

@ -208,8 +208,7 @@ grub_util_devmapper_part_to_disk (struct stat *st,
&major, &minor, 0))
{
*is_part = 1;
return grub_find_device ("/dev",
(major << 8) | minor);
return grub_find_device ("/dev", makedev (major, minor));
}
*is_part = 0;
return xstrdup (path);