diff options
author | sbruno <sbruno@FreeBSD.org> | 2012-05-18 21:50:26 +0000 |
---|---|---|
committer | sbruno <sbruno@FreeBSD.org> | 2012-05-18 21:50:26 +0000 |
commit | 90b88756cf2b35e91f98b7526964eb9550d7eb5a (patch) | |
tree | 2a4bf6705236e5b38a16964b12045085d72432b4 /usr.sbin | |
parent | 991d8ef5f4430e8ff70dbaabf91a756f1cbb19a7 (diff) | |
download | FreeBSD-src-90b88756cf2b35e91f98b7526964eb9550d7eb5a.zip FreeBSD-src-90b88756cf2b35e91f98b7526964eb9550d7eb5a.tar.gz |
Decode new battery status indications.
Requires r235634
Reviewed by: ambrisko@
MFC after: 3 days
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/mfiutil/mfi_show.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/usr.sbin/mfiutil/mfi_show.c b/usr.sbin/mfiutil/mfi_show.c index 4f83b52..8311f4b 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"); |