Skip to contentSkip to conversation

gpio: Correct handling of 'gpio status'

PATCH In review Simon Glass 5 participants 5 messages Feb 14, 2016 – Feb 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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')

---

 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
2.7.0.rc3.207.g0ac5344
#1 lore raw

PATCH 1/1 gpio: Correct handling of 'gpio status'

Quoted 6 lines · Simon Glass

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

With this patch 'gpio set' works again.

Thanks,
Soeren

Quoted 19 lines

---

 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();
#2 lore raw

PATCH 1/1 gpio: Correct handling of 'gpio status'

In reply to Simon Glass
Quoted 11 lines · Simon Glass

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

---

 cmd/gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#3 lore raw

PATCH 1/1 gpio: Correct handling of 'gpio status'

In reply to Simon Glass
Quoted 16 lines · Simon Glass

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

---

  cmd/gpio.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
cmd/gpio.c +0 -0
index 2b78b16..693998e 100644

cmd/gpio.c static int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) · line 147

Quoted 8 lines
cmd/gpio.c +1 -1
@@ -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();
#4 lore raw
In reply to Simon Glass
Quoted 9 lines · Simon Glass

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

Applied to u-boot/master, thanks!

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/2f9cb69c/attachment.sig>