Blame SOURCES/0196-devmapper-getroot-use-makedev-instead-of-direct-shif.patch

f731ee
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f731ee
From: Andrei Borzenkov <arvidjaar@gmail.com>
f731ee
Date: Sat, 7 Nov 2015 09:46:46 +0300
f731ee
Subject: [PATCH] devmapper/getroot: use makedev instead of direct shift
f731ee
f731ee
Fixes device detection with large number of devices.
f731ee
f731ee
Reported by Tim Wallberg <twalberg@comcast.net>
f731ee
f731ee
(cherry picked from commit 349a381df0ce2e809506f7b166bf952f97407330)
f731ee
f731ee
Resolves: rhbz#1279599
f731ee
---
f731ee
 grub-core/osdep/devmapper/getroot.c | 3 +--
f731ee
 1 file changed, 1 insertion(+), 2 deletions(-)
f731ee
f731ee
diff --git a/grub-core/osdep/devmapper/getroot.c b/grub-core/osdep/devmapper/getroot.c
f731ee
index d02386b3498..de32102322b 100644
f731ee
--- a/grub-core/osdep/devmapper/getroot.c
f731ee
+++ b/grub-core/osdep/devmapper/getroot.c
f731ee
@@ -204,8 +204,7 @@ grub_util_devmapper_part_to_disk (struct stat *st,
f731ee
 					 &major, &minor, 0))
f731ee
     {
f731ee
       *is_part = 1;
f731ee
-      return grub_find_device ("/dev",
f731ee
-			       (major << 8) | minor);
f731ee
+      return grub_find_device ("/dev", makedev (major, minor));
f731ee
     }
f731ee
   *is_part = 0;
f731ee
   return xstrdup (path);