nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0166-Handle-rssd-storage-devices.patch

f725e3
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f725e3
From: Peter Jones <pjones@redhat.com>
f725e3
Date: Tue, 30 Jun 2015 15:50:41 -0400
f725e3
Subject: [PATCH] Handle rssd storage devices.
f725e3
f725e3
Resolves: rhbz#1087962
f725e3
f725e3
Signed-off-by: Peter Jones <pjones@redhat.com>
f725e3
---
f725e3
 grub-core/osdep/linux/getroot.c | 13 +++++++++++++
f725e3
 1 file changed, 13 insertions(+)
f725e3
f725e3
diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
f725e3
index 7007193d9c7..5987d078a2f 100644
f725e3
--- a/grub-core/osdep/linux/getroot.c
f725e3
+++ b/grub-core/osdep/linux/getroot.c
f725e3
@@ -884,6 +884,19 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,
f725e3
 	  return path;
f725e3
 	}
f725e3
 
f725e3
+      /* If this is an rssd device. */
f725e3
+      if ((strncmp ("rssd", p, 4) == 0) && p[4] >= 'a' && p[4] <= 'z')
f725e3
+	{
f725e3
+	  char *pp = p + 4;
f725e3
+	  while (*pp >= 'a' && *pp <= 'z')
f725e3
+	    pp++;
f725e3
+	  if (*pp)
f725e3
+	    *is_part = 1;
f725e3
+	  /* /dev/rssd[a-z]+[0-9]* */
f725e3
+	  *pp = '\0';
f725e3
+	  return path;
f725e3
+	}
f725e3
+
f725e3
       /* If this is a loop device */
f725e3
       if ((strncmp ("loop", p, 4) == 0) && p[4] >= '0' && p[4] <= '9')
f725e3
 	{