nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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