freebsd: fix

This commit is contained in:
Alastair Poole 2020-06-18 11:47:22 +01:00
parent d5c10b939d
commit 3ed3be21a4
1 changed files with 1 additions and 1 deletions

View File

@ -894,7 +894,7 @@ _battery_state_get(power_t *power)
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);
power->batteries[i]->name = strdup(name);
battio.unit = i;
if (ioctl(fd, ACPIIO_BATT_GET_BST, &battio) != -1)
{