Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 May 2012 14:32:47 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r235650 - stable/8/usr.sbin/mfiutil
Message-ID:  <201205191432.q4JEWle6027225@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Sat May 19 14:32:47 2012
New Revision: 235650
URL: http://svn.freebsd.org/changeset/base/235650

Log:
  MFC r233713:
  
    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 mfiutil 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.
  
  To unbreak the build after:	r235625 (?)

Modified:
  stable/8/usr.sbin/mfiutil/mfi_config.c
  stable/8/usr.sbin/mfiutil/mfi_drive.c
Directory Properties:
  stable/8/usr.sbin/mfiutil/   (props changed)

Modified: stable/8/usr.sbin/mfiutil/mfi_config.c
==============================================================================
--- stable/8/usr.sbin/mfiutil/mfi_config.c	Sat May 19 14:30:49 2012	(r235649)
+++ stable/8/usr.sbin/mfiutil/mfi_config.c	Sat May 19 14:32:47 2012	(r235650)
@@ -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 
 
 	/* 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);
 	}

Modified: stable/8/usr.sbin/mfiutil/mfi_drive.c
==============================================================================
--- stable/8/usr.sbin/mfiutil/mfi_drive.c	Sat May 19 14:30:49 2012	(r235649)
+++ stable/8/usr.sbin/mfiutil/mfi_drive.c	Sat May 19 14:32:47 2012	(r235650)
@@ -149,7 +149,7 @@ mfi_pdstate(enum mfi_pd_state state)
 	case MFI_PD_STATE_COPYBACK:
 		return ("COPYBACK");
 	case MFI_PD_STATE_SYSTEM:
-		return ("SYSTEM");
+		return ("JBOD");
 	default:
 		sprintf(buf, "PSTATE 0x%04x", state);
 		return (buf);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205191432.q4JEWle6027225>