gpio: Correct handling of 'gpio status'
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'.
---
cmd/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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_statusgpio_status ();
Signature · 1 line
2.7.0.rc3.207.g0ac5344
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')Reported-by Soeren Moch <[email protected]>Signed-off-by Simon Glass <[email protected]>
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@@ -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_statusgpio_status ();
PATCH 1/1 gpio: Correct handling of 'gpio status'
In reply to Simon GlassQuoted 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')Reported-by Soeren Moch <[email protected]>Signed-off-by Simon Glass <[email protected]>---
cmd/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
PATCH 1/1 gpio: Correct handling of 'gpio status'
In reply to Simon GlassQuoted 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')Reported-by Soeren Moch <[email protected]>Signed-off-by Simon Glass <[email protected]>---
cmd/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)cmd/gpio.c +0
-0
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_statusgpio_status ();
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')Reported-by Soeren Moch <[email protected]>Signed-off-by Simon Glass <[email protected]>Tested-by Soeren Moch <[email protected]>Reviewed-by Bin Meng <[email protected]>Tested-by Hannes Schmelzer <[email protected]>
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>