From 349a381df0ce2e809506f7b166bf952f97407330 Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Sat, 7 Nov 2015 09:46:46 +0300 Subject: [PATCH] devmapper/getroot: use makedev instead of direct shift Fixes device detection with large number of devices. Reported by Tim Wallberg --- grub-core/osdep/devmapper/getroot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/grub-core/osdep/devmapper/getroot.c b/grub-core/osdep/devmapper/getroot.c index 0a77a04b9..64419f678 100644 --- a/grub-core/osdep/devmapper/getroot.c +++ b/grub-core/osdep/devmapper/getroot.c @@ -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);