[U-Boot] [PATCH] Revert "gpio: Allow 's' as an abbreviation for 'status'"

This reverts commit 0ffe6ab521f900bcc765be8f2f31d2c2ba3f0a7e.
The GPIO command has five sub-commands: status, input, set, clear, and toggle. Commit 0ffe6ab521f9 (" gpio: Allow 's' as an abbreviation for 'status'") made the "set" sub-command unreachable because the sub-command that starts with the letter "s" is regarded as the "status" command.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
cmd/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/gpio.c b/cmd/gpio.c index 2b78b16..7e02daf 100644 --- a/cmd/gpio.c +++ b/cmd/gpio.c @@ -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 (!strcmp(str_cmd, "status")) { /* Support deprecated gpio_status() */ #ifdef gpio_status gpio_status();

2016-02-15 16:10 GMT+09:00 Masahiro Yamada yamada.masahiro@socionext.com:
This reverts commit 0ffe6ab521f900bcc765be8f2f31d2c2ba3f0a7e.
The GPIO command has five sub-commands: status, input, set, clear, and toggle. Commit 0ffe6ab521f9 (" gpio: Allow 's' as an abbreviation for 'status'") made the "set" sub-command unreachable because the sub-command that starts with the letter "s" is regarded as the "status" command.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com
Ah, I missed this: http://patchwork.ozlabs.org/patch/582638/
Just disregard this one.
participants (1)
-
Masahiro Yamada