|
Lines 96-102
Link Here
|
| 96 |
err(EX_USAGE, "invalid battery %d", num); |
96 |
err(EX_USAGE, "invalid battery %d", num); |
| 97 |
|
97 |
|
| 98 |
battio.unit = num; |
98 |
battio.unit = num; |
| 99 |
if (ioctl(acpifd, ACPIIO_CMBAT_GET_BIF, &battio) == -1) |
99 |
if (ioctl(acpifd, ACPIIO_BATT_GET_BIF, &battio) == -1) |
| 100 |
err(EX_IOERR, "get battery info (%d) failed", num); |
100 |
err(EX_IOERR, "get battery info (%d) failed", num); |
| 101 |
printf("Battery %d information\n", num); |
101 |
printf("Battery %d information\n", num); |
| 102 |
if (battio.bif.units == 0) |
102 |
if (battio.bif.units == 0) |
|
Lines 129-135
Link Here
|
| 129 |
printf("OEM info:\t\t%s\n", battio.bif.oeminfo); |
129 |
printf("OEM info:\t\t%s\n", battio.bif.oeminfo); |
| 130 |
|
130 |
|
| 131 |
battio.unit = num; |
131 |
battio.unit = num; |
| 132 |
if (ioctl(acpifd, ACPIIO_CMBAT_GET_BST, &battio) == -1) |
132 |
if (ioctl(acpifd, ACPIIO_BATT_GET_BST, &battio) == -1) |
| 133 |
err(EX_IOERR, "get battery info (%d) failed", num); |
133 |
err(EX_IOERR, "get battery info (%d) failed", num); |
| 134 |
|
134 |
|
| 135 |
if (battio.bst.state != ACPI_BATT_STAT_NOT_PRESENT) { |
135 |
if (battio.bst.state != ACPI_BATT_STAT_NOT_PRESENT) { |