summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2013-05-10 09:45:55 -0700
committerChromeBot <chrome-bot@google.com>2013-05-13 19:31:10 -0700
commit59921512e7c634532827df016c54ea5932de4e1f (patch)
treed6f85d4ae82dce4fab0c69b4d47c77d84eb4eabb
parente5ec5f34fc25e0367bd6b89d4d93fb1d3c90c404 (diff)
downloadchrome-ec-59921512e7c634532827df016c54ea5932de4e1f.tar.gz
Clarify help text for dumb USB port power control
The help text says to pass 0 or 1 for the mode but the code only accepts "on" or "off". Fix up the help text to match and have the display output for the port status also use on/off so it is consistent with the input. BUG=chrome-os-partner:18825 BRANCH=none TEST=manual: verify "usbchargemode 0 on" works as it is explained in the help text. Change-Id: Ib32dc68af93989d277aa84a1cb53ae9b66a8b595 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/50838
-rw-r--r--common/usb_port_power_dumb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/usb_port_power_dumb.c b/common/usb_port_power_dumb.c
index ed7fdc0a81..d032aeb8fe 100644
--- a/common/usb_port_power_dumb.c
+++ b/common/usb_port_power_dumb.c
@@ -108,18 +108,18 @@ static int command_set_mode(int argc, char **argv)
usb_port_set_enabled(port_id, mode);
/* fallthrough */
case 1:
- ccprintf("Port 0: %d\nPort 1: %d\n",
- state.en[0], state.en[1]);
+ ccprintf("Port 0: %s\nPort 1: %s\n",
+ state.en[0] ? "on" : "off",
+ state.en[1] ? "on" : "off");
return EC_SUCCESS;
}
return EC_ERROR_PARAM_COUNT;
}
DECLARE_CONSOLE_COMMAND(usbchargemode, command_set_mode,
- "[<port> <0 | 1>]",
+ "[<port> <on | off>]",
"Set USB charge mode",
- "Modes: 0=Disabled\n"
- " 1=Enabled\n");
+ NULL);
/*****************************************************************************/