From: Hannes Schmelzer <hannes@schmelzer.or.at>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] gpio: Correct handling of 'gpio status'
Date: Mon, 15 Feb 2016 12:03:51 +0100 [thread overview]
Message-ID: <56C1B097.1070504@schmelzer.or.at> (raw)
In-Reply-To: <1455492539-24868-1-git-send-email-sjg@chromium.org>
On 15.02.2016 00:28, Simon Glass wrote:
> 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();
Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
next prev parent reply other threads:[~2016-02-15 11:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2016-02-15 22:36 ` [U-Boot] " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C1B097.1070504@schmelzer.or.at \
--to=hannes@schmelzer.or.at \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox