1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00
freebsd/usr.sbin/mfiutil
Ed Maste b08d3049f0 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
..
Makefile
mfi_cmd.c Fix division by zero, causing floating point exception in a drive progress 2011-02-25 13:59:59 +00:00
mfi_config.c Add global -d and -e options to either print device numbers 2011-06-20 21:28:50 +00:00
mfi_drive.c Add global -d and -e options to either print device numbers 2011-06-20 21:28:50 +00:00
mfi_evt.c Contrary to when returning in all-good cases at the end of functions we 2011-06-09 19:52:28 +00:00
mfi_flash.c Contrary to when returning in all-good cases at the end of functions we 2011-06-09 19:52:28 +00:00
mfi_patrol.c Add global -d and -e options to either print device numbers 2011-06-20 21:28:50 +00:00
mfi_show.c Improve battery capacity reporting 2011-09-27 14:28:07 +00:00
mfi_volume.c Move the logic to parse volume cache commands out into a separate function 2011-09-02 16:00:51 +00:00
mfiutil.8 Move the logic to parse volume cache commands out into a separate function 2011-09-02 16:00:51 +00:00
mfiutil.c Add global -d and -e options to either print device numbers 2011-06-20 21:28:50 +00:00
mfiutil.h Add global -d and -e options to either print device numbers 2011-06-20 21:28:50 +00:00