summaryrefslogtreecommitdiffstats
path: root/master/debian/kfreebsd_mfi_devices.patch
blob: 6b0992eaa662ef4e06e68703c2bc637e19760b9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- a/util/deviceiter.c
+++ b/util/deviceiter.c
@@ -298,6 +298,12 @@
 {
   sprintf (name, "/dev/ar%d", unit);
 }
+
+static void
+get_mfi_disk_name (char *name, int unit)
+{
+  sprintf (name, "/dev/mfid%d", unit);
+}
 #endif
 
 #ifdef __linux__
@@ -658,6 +664,19 @@
       if (check_device_readable_unique (name))
 	{
 	  if (hook (name, 0))
+	    goto out;
+        }
+    }
+
+  /* LSI MegaRAID SAS.  */
+  for (i = 0; i < 32; i++)
+    {
+      char name[20];
+
+      get_mfi_disk_name (name, i);
+      if (check_device_readable_unique (name))
+	{
+	  if (hook (name, 0))
 	    goto out;
         }
     }