nalika / rpms / grub2

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