public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] gpio: Correct handling of 'gpio status'
@ 2016-02-14 23:28 Simon Glass
  2016-02-15  7:36 ` Soeren Moch
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Simon Glass @ 2016-02-14 23:28 UTC (permalink / raw)
  To: u-boot

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 <smoch@web.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

 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();
-- 
2.7.0.rc3.207.g0ac5344

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-15 22:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-14 23:28 [U-Boot] [PATCH] gpio: Correct handling of 'gpio status' Simon Glass
2016-02-15  7:36 ` Soeren Moch
2016-02-15 11:02 ` Bin Meng
2016-02-15 11:03 ` Hannes Schmelzer
2016-02-15 22:36 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox