Modify the fix in rev 1.16 slightly. Instead of setting the cap to zero,

just skip summing it if it's unknown.

MFC after:	1 day
This commit is contained in:
Nate Lawson 2005-08-11 17:12:57 +00:00
parent 199c7836bc
commit 84cdcfb36f

View File

@ -227,9 +227,8 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_battinfo *battinfo)
total_min += bi[i].min;
/* If this battery is not present, don't use its capacity. */
if (bi[i].cap == -1)
bi[i].cap = 0;
total_cap += bi[i].cap;
if (bi[i].cap != -1)
total_cap += bi[i].cap;
}
/*