]> git.sur5r.net Git - u-boot/commitdiff
gpio: Allow 's' as an abbreviation for 'status'
authorSimon Glass <sjg@chromium.org>
Fri, 22 Jan 2016 02:43:51 +0000 (19:43 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 22 Jan 2016 03:42:35 +0000 (20:42 -0700)
The 'gpio' command allows abbreviations for most subcommands. Allow them
for 'status' also.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/cmd_gpio.c

index 65d6df451c6d4f4c5dc9c26a94a02a536b42386e..bb0f63a592477f6f2288d14f5b12283764f790bb 100644 (file)
@@ -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 (!strcmp(str_cmd, "status")) {
+       if (!strncmp(str_cmd, "status", 1)) {
                /* Support deprecated gpio_status() */
 #ifdef gpio_status
                gpio_status();