From 52c7b04cf615e9c8d6ddcfbaa65f0e3d5372aea2 Mon Sep 17 00:00:00 2001 From: sbruno Date: Thu, 24 May 2012 16:11:13 +0000 Subject: [PATCH] MFC r235634 Decode new battery status indications. git-svn-id: svn://svn.freebsd.org/base/stable/9@235914 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- usr.sbin/mfiutil/mfi_show.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/usr.sbin/mfiutil/mfi_show.c b/usr.sbin/mfiutil/mfi_show.c index 4f83b52e3..8311f4bab 100644 --- a/usr.sbin/mfiutil/mfi_show.c +++ b/usr.sbin/mfiutil/mfi_show.c @@ -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"); -- 2.45.0