emaste 42f9fc1b3f 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
2011-09-27 14:28:07 +00:00
..
2010-12-06 10:24:06 +00:00
2010-08-23 22:24:11 +00:00
2011-06-24 07:05:20 +00:00
2010-08-23 22:24:11 +00:00
2010-02-26 09:41:16 +00:00
2007-12-19 03:31:44 +00:00
2011-08-01 22:21:18 +00:00
2010-06-05 08:11:11 +00:00
2011-07-03 20:59:57 +00:00
2010-05-17 11:18:33 +00:00
2011-06-24 07:05:20 +00:00
MFC
2011-06-01 16:54:33 +00:00
2010-12-20 08:54:30 +00:00
2011-03-17 22:17:56 +00:00
2010-05-14 01:45:05 +00:00
2011-06-24 07:05:20 +00:00
2010-12-20 09:36:54 +00:00
2011-06-24 07:05:20 +00:00
2010-03-04 13:35:57 +00:00
2010-01-03 15:32:25 +00:00
2011-08-06 09:11:30 +00:00
2010-10-05 06:31:11 +00:00
2011-06-24 07:05:20 +00:00
2010-07-30 11:58:18 +00:00
2011-02-19 11:44:04 +00:00
2011-06-24 07:05:20 +00:00
2011-05-30 11:09:38 +00:00
2011-01-27 14:16:12 +00:00