Skip to contentSkip to conversation

cmd: gpio: Fix 'set' regression

PATCH New Tom Rini 1 participant 2 messages Feb 15, 2016

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 cmd: gpio: Fix 'set' regression

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').

---
 cmd/gpio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/gpio.c +1 -1
index 2b78b16..693998e 100644
@@ -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();
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 1/1 cmd: gpio: Fix 'set' regression

Quoted 7 lines · Tom Rini

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').

Aaand I see I'm late to the party, oh well.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160215/1fdf36ae/attachment.sig>