[U-Boot] [PATCH] cmd: gpio: Fix 'set' regression

Tom Rini trini at konsulko.com
Mon Feb 15 17:02:55 CET 2016


In 0ffe6ab we changed the test for status from the whole word to just
starting with 's' which of course broke 'set', so change the test to
'st' so that it won't catch set (which is still just a test for 's').

Cc: Simon Glass <sjg at chromium.org>
Reported-by: Soeren Moch <smoch at web.de>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
 cmd/gpio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/gpio.c b/cmd/gpio.c
index 2b78b16..693998e 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 (!strncmp(str_cmd, "status", 2)) {
 		/* Support deprecated gpio_status() */
 #ifdef gpio_status
 		gpio_status();
-- 
1.7.9.5



More information about the U-Boot mailing list