diff options
author | emaste <emaste@FreeBSD.org> | 2011-09-27 14:28:07 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2011-09-27 14:28:07 +0000 |
commit | 42f9fc1b3f7f58b22e97447de2612dea4d1caae3 (patch) | |
tree | 4aa4a29572f489798234793a4f39685e7531616e /lib/libc/stdlib/hcreate.c | |
parent | f5da64d92a9dcfed1148acf6352f6f9b1954859d (diff) | |
download | FreeBSD-src-42f9fc1b3f7f58b22e97447de2612dea4d1caae3.zip FreeBSD-src-42f9fc1b3f7f58b22e97447de2612dea4d1caae3.tar.gz |
Improve battery capacity reporting
When a status pointer is passed in mfi_dcmd_command does not return an
errno (if the ioctl is successful), so move the test for NO_HW_PRESENT
outside of the error case. This should fix incorrect reporting for
systems with a dead or no battery.
Additionally, handle error codes other than NO_HW_PRESENT by omitting
the battery capacity display. LSI's supercap-based parts (CV series)
report their data using the same interface as battery-based parts,
except that they do not include the capacity stats (state of charge,
cumulative charge cycles, etc.)
Reviewd by: jhb, bz
Tested by: pluknet@, Garrett Cooper
PR: bin/160581
MFC after: 1 week
Diffstat (limited to 'lib/libc/stdlib/hcreate.c')
0 files changed, 0 insertions, 0 deletions