linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Mugunthan V N <mugunthanvnm@ti.com>, linux-iio@vger.kernel.org
Cc: Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Subject: Re: [PATCH] tools: iio: iio_generic_buffer: fix argument '?' option
Date: Thu, 22 Sep 2016 18:47:11 +0100	[thread overview]
Message-ID: <053fef10-8371-1a94-b4d4-675db99e55e7@kernel.org> (raw)
In-Reply-To: <20160921165758.8471-1-mugunthanvnm@ti.com>

On 21/09/16 17:57, Mugunthan V N wrote:
> When help ('?') option is passed to the command, the help text
> printed but not from '?' switch case of getopt_long() but as a
> invalid argument as below. Fix this by adding '?' to opt_String
> of getopt_long().
> 
> root@am437x-evm:~# ./iio_generic_buffer -?
> ./iio_generic_buffer: invalid option -- '?'
> Usage: generic_buffer [options]...
> Capture, convert and output data from IIO device buffer
>   -a         Auto-activate all available channels
> ...
> 
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Thanks,

Applied to the togreg branch of iio.git, initially pushed
out as testing.

Jonathan
> ---
>  tools/iio/iio_generic_buffer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/iio/iio_generic_buffer.c b/tools/iio/iio_generic_buffer.c
> index f39c0e9..85e2329 100644
> --- a/tools/iio/iio_generic_buffer.c
> +++ b/tools/iio/iio_generic_buffer.c
> @@ -352,7 +352,7 @@ int main(int argc, char **argv)
>  
>  	register_cleanup();
>  
> -	while ((c = getopt_long(argc, argv, "ac:egl:n:N:t:T:w:", longopts, NULL)) != -1) {
> +	while ((c = getopt_long(argc, argv, "ac:egl:n:N:t:T:w:?", longopts, NULL)) != -1) {
>  		switch (c) {
>  		case 'a':
>  			autochannels = AUTOCHANNELS_ENABLED;
> 


      reply	other threads:[~2016-09-22 17:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 16:57 [PATCH] tools: iio: iio_generic_buffer: fix argument '?' option Mugunthan V N
2016-09-22 17:47 ` Jonathan Cameron [this message]

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=053fef10-8371-1a94-b4d4-675db99e55e7@kernel.org \
    --to=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=mugunthanvnm@ti.com \
    --cc=pmeerw@pmeerw.net \
    /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;
as well as URLs for NNTP newsgroup(s).