summaryrefslogtreecommitdiffstats
path: root/master/debian/kfreebsd_mfi_devices.patch
diff options
context:
space:
mode:
Diffstat (limited to 'master/debian/kfreebsd_mfi_devices.patch')
-rw-r--r--master/debian/kfreebsd_mfi_devices.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/master/debian/kfreebsd_mfi_devices.patch b/master/debian/kfreebsd_mfi_devices.patch
new file mode 100644
index 0000000..6b0992e
--- /dev/null
+++ b/master/debian/kfreebsd_mfi_devices.patch
@@ -0,0 +1,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;
+ }
+ }