Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 May 2012 16:11:14 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r235914 - stable/9/usr.sbin/mfiutil
Message-ID:  <201205241611.q4OGBEiW047491@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Thu May 24 16:11:13 2012
New Revision: 235914
URL: http://svn.freebsd.org/changeset/base/235914

Log:
  MFC r235634
  
  Decode new battery status indications.

Modified:
  stable/9/usr.sbin/mfiutil/mfi_show.c
Directory Properties:
  stable/9/usr.sbin/mfiutil/   (props changed)

Modified: stable/9/usr.sbin/mfiutil/mfi_show.c
==============================================================================
--- stable/9/usr.sbin/mfiutil/mfi_show.c	Thu May 24 15:55:41 2012	(r235913)
+++ stable/9/usr.sbin/mfiutil/mfi_show.c	Thu May 24 16:11:13 2012	(r235914)
@@ -224,7 +224,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");



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