diff --git a/ChangeLog b/ChangeLog index 184b0d763..039621768 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-08-10 Robert Millan + + Detect LSI MegaRAID SAS (`mfi') devices on GNU/kFreeBSD. + + * util/deviceiter.c [__FreeBSD_kernel__] (get_mfi_disk_name): New + function. + [__FreeBSD_kernel__] (grub_util_iterate_devices): Scan for mfi + (/dev/mfid[0-9]+) devices using get_mfi_disk_name(). + 2011-08-03 Robert Millan * include/grub/zfs/zap_leaf.h (typedef union zap_leaf_chunk): Mark diff --git a/util/deviceiter.c b/util/deviceiter.c index 2a8acec0e..208dcfdde 100644 --- a/util/deviceiter.c +++ b/util/deviceiter.c @@ -298,6 +298,12 @@ get_ataraid_disk_name (char *name, int unit) { 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__ @@ -661,6 +667,19 @@ grub_util_iterate_devices (int NESTED_FUNC_ATTR (*hook) (const char *, int), 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; + } + } #endif #ifdef __linux__