Skip to content
Snippets Groups Projects
Commit 4c80c53c authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

gpio: Correct handling of 'gpio status'


This is broken - we need to look at the first two characters to distinguish
'gpio status' from 'gpio set'.

Fixes: 0ffe6ab5 (gpio: Allow 's' as an abbreviation for 'status')
Reported-by: default avatarSoeren Moch <smoch@web.de>
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Tested-by: default avatarSoeren Moch <smoch@web.de>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Tested-by: default avatarHannes Schmelzer <oe5hpm@oevsv.at>
parent ed0f40a6
No related branches found
No related tags found
No related merge requests found
......@@ -141,7 +141,7 @@ static int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#endif
if (argc > 0)
str_gpio = *argv;
if (!strncmp(str_cmd, "status", 1)) {
if (!strncmp(str_cmd, "status", 2)) {
/* Support deprecated gpio_status() */
#ifdef gpio_status
gpio_status();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment