From owner-svn-src-all@FreeBSD.ORG Sat May 19 18:57:13 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19D7A106566B; Sat, 19 May 2012 18:57:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7DABB8FC20; Sat, 19 May 2012 18:57:11 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA04908; Sat, 19 May 2012 21:57:03 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SVopr-000Bto-3I; Sat, 19 May 2012 21:57:03 +0300 Message-ID: <4FB7ECFC.2020509@FreeBSD.org> Date: Sat, 19 May 2012 21:57:00 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201205191432.q4JEWle6027225@svn.freebsd.org> In-Reply-To: <201205191432.q4JEWle6027225@svn.freebsd.org> X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-8@FreeBSD.org Subject: Re: svn commit: r235650 - stable/8/usr.sbin/mfiutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 May 2012 18:57:13 -0000 on 19/05/2012 17:32 Bjoern A. Zeeb said the following: > 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) A small nit: previously MFI_ARRAY_SIZE wasn't used for anything except MAX_DRIVES_PER_ARRAY, now it's not used for anything. > #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); -- Andriy Gapon