1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Decode new battery status indications.

Requires r235634

Reviewed by:	ambrisko@
MFC after:	3 days
This commit is contained in:
Sean Bruno 2012-05-18 21:50:26 +00:00
parent c1def54fb4
commit f8b329b0bf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=235635

View File

@ -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");