FreeBSD: Fix

edi-0.5
Alastair Poole 3 years ago
parent ba22c1c4fd
commit 41a8e8b7ca
  1. 5
      src/bin/system.c

@ -899,7 +899,10 @@ _battery_state_get(power_t *power)
battio.unit = i;
if (ioctl(fd, ACPIIO_BATT_GET_BIF, &battio) != -1)
{
power->batteries[i]->charge_full = battio.bif.dcap;
if (battio.bif.lfcap == 0)
power->batteries[i]->charge_full = battio.bif.dcap;
else
power->batteries[i]->charge_full = battio.bif.lfcap;
}
snprintf(name, sizeof(name), "%s %s", battio.bif.oeminfo, battio.bif.model);
power->battery_names[i] = strdup(name);

Loading…
Cancel
Save