Show charging allowed info for 'battery' command

This will help us debug battery charging.

BUG=chrome-os-partner:22055
TEST=On Kirby, type 'battery' and check the output.
BRANCH=None

Change-Id: Id510ca7816f359e64072837df6464a412eb7739f
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/168181
This commit is contained in:
Vic Yang
2013-09-05 10:55:01 +08:00
committed by chrome-internal-fetch
parent 8d921815bf
commit c2e8372b41

View File

@@ -91,6 +91,10 @@ static int print_battery_info(void)
battery_is_in_10mw_mode(&value);
unit = value ? "0 mW" : " mAh";
print_item_name("Charging:");
if (check_print_error(battery_charging_allowed(&value)))
ccprintf("%sAllowed\n", value ? "" : "Not ");
print_item_name("Charge:");
if (check_print_error(battery_state_of_charge(&value)))
ccprintf("%d %%\n", value);