From owner-svn-src-stable@FreeBSD.ORG Sun May 27 19:10:29 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9B38106566B; Sun, 27 May 2012 19:10:29 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3F148FC0A; Sun, 27 May 2012 19:10:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4RJATV3066876; Sun, 27 May 2012 19:10:29 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4RJATf7066874; Sun, 27 May 2012 19:10:29 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201205271910.q4RJATf7066874@svn.freebsd.org> From: Sean Bruno Date: Sun, 27 May 2012 19:10:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r236163 - stable/7/usr.sbin/mfiutil X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 May 2012 19:10:29 -0000 Author: sbruno Date: Sun May 27 19:10:29 2012 New Revision: 236163 URL: http://svn.freebsd.org/changeset/base/236163 Log: MFC r235635 Decode new battery status indications. Modified: stable/7/usr.sbin/mfiutil/mfi_show.c Directory Properties: stable/7/usr.sbin/mfiutil/ (props changed) Modified: stable/7/usr.sbin/mfiutil/mfi_show.c ============================================================================== --- stable/7/usr.sbin/mfiutil/mfi_show.c Sun May 27 19:03:16 2012 (r236162) +++ stable/7/usr.sbin/mfiutil/mfi_show.c Sun May 27 19:10:29 2012 (r236163) @@ -219,7 +219,29 @@ show_battery(int ac, char **av) } if (stat.fw_status & MFI_BBU_STATE_DISCHARGE_ACTIVE) { printf("%s DISCHARGING", comma ? "," : ""); + comma = 1; } + if (stat.fw_status & MFI_BBU_STATE_LEARN_CYC_REQ) { + printf("%s LEARN_CYCLE_REQUESTED", comma ? "," : ""); + comma = 1; + } + if (stat.fw_status & MFI_BBU_STATE_LEARN_CYC_ACTIVE) { + printf("%s LEARN_CYCLE_ACTIVE", comma ? "," : ""); + comma = 1; + } + if (stat.fw_status & MFI_BBU_STATE_LEARN_CYC_FAIL) { + printf("%s LEARN_CYCLE_FAIL", comma ? "," : ""); + comma = 1; + } + if (stat.fw_status & MFI_BBU_STATE_LEARN_CYC_TIMEOUT) { + printf("%s LEARN_CYCLE_TIMEOUT", comma ? "," : ""); + comma = 1; + } + if (stat.fw_status & MFI_BBU_STATE_I2C_ERR_DETECT) { + printf("%s I2C_ERROR_DETECT", comma ? "," : ""); + comma = 1; + } + if (!comma) printf(" normal"); printf("\n");