Notify the user when the battery is critically low. In the future, we

may want to shut down here but the chance of BIOS vendors getting this
wrong is high.  They're only supposed to announce this when all batteries
hit their critical level but past experience indicates we should be
conservative about this for now.
This commit is contained in:
njl 2004-10-11 06:18:07 +00:00
parent 46eb5d6814
commit bc141ad408

View File

@ -189,6 +189,10 @@ acpi_cmbat_get_bst(void *context)
goto end;
acpi_cmbat_info_updated(&sc->bst_lastupdated);
/* XXX Should we shut down here? */
if (sc->bst.state & ACPI_BATT_STAT_CRITICAL)
device_printf(dev, "critically low charge!\n");
end:
if (bst_buffer.Pointer != NULL)
AcpiOsFree(bst_buffer.Pointer);