aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/mfiutil/mfi_config.c
diff options
context:
space:
mode:
authorDoug Ambrisko <ambrisko@FreeBSD.org>2012-03-30 23:39:39 +0000
committerDoug Ambrisko <ambrisko@FreeBSD.org>2012-03-30 23:39:39 +0000
commitb53011f9cfee8b9abdb9257a587cf605776ac0e7 (patch)
treee61653b8dd8b63d434dd67f12cee545d3c4c1482 /usr.sbin/mfiutil/mfi_config.c
parenta6ba0fd64d4743eba0a8f89de63ed72b031e9e00 (diff)
parent1d8f043a7485a83ae2417337e80d69468c14d8fe (diff)
downloadsrc-b53011f9cfee8b9abdb9257a587cf605776ac0e7.tar.gz
src-b53011f9cfee8b9abdb9257a587cf605776ac0e7.zip
MFhead_mfi r233621
Remove the magic mfi_array is 288 bytes and just use the sizeof the array since it is not 288 bytes. Change reporting of a "SYSTEM" disk to "JBOD" to match LSI MegaCli and firmware reporting. This means that fiutil command to "create jbod" is now a little confusing since a RAID per drive is not really what LSI defines JBOD to be. This should be fixed in the future and support added to really create LSI JBOD and enable that feature on cards that support it.
Notes
Notes: svn path=/head/; revision=233713
Diffstat (limited to 'usr.sbin/mfiutil/mfi_config.c')
-rw-r--r--usr.sbin/mfiutil/mfi_config.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/mfiutil/mfi_config.c b/usr.sbin/mfiutil/mfi_config.c
index 32cb17109b62..feb285d4a3eb 100644
--- a/usr.sbin/mfiutil/mfi_config.c
+++ b/usr.sbin/mfiutil/mfi_config.c
@@ -211,9 +211,8 @@ clear_config(int ac, char **av)
}
MFI_COMMAND(top, clear, clear_config);
-#define MFI_ARRAY_SIZE 288
-#define MAX_DRIVES_PER_ARRAY \
- ((MFI_ARRAY_SIZE - sizeof(struct mfi_array)) / 8)
+#define MAX_DRIVES_PER_ARRAY MFI_MAX_ROW_SIZE
+#define MFI_ARRAY_SIZE sizeof(struct mfi_array)
#define RT_RAID0 0
#define RT_RAID1 1
@@ -305,7 +304,7 @@ parse_array(int fd, int raid_type, char *array_str, struct array_info *info)
/* Validate the number of drives for this array. */
if (count >= MAX_DRIVES_PER_ARRAY) {
- warnx("Too many drives for a single array: max is %zu",
+ warnx("Too many drives for a single array: max is %d",
MAX_DRIVES_PER_ARRAY);
return (EINVAL);
}