summaryrefslogtreecommitdiffstats
path: root/tools/iio
diff options
context:
space:
mode:
authorMugunthan V N <mugunthanvnm@ti.com>2016-09-21 18:57:58 +0200
committerJonathan Cameron <jic23@kernel.org>2016-09-22 19:46:39 +0200
commit44c5ba96ec1083b7694a88fd99c3012213314b82 (patch)
tree5268af10971c8f3e868152b99c31b2967d5bfaff /tools/iio
parentiio:pressure: zpa2326: remove redundant "DEBUG" ifdef (diff)
downloadlinux-44c5ba96ec1083b7694a88fd99c3012213314b82.tar.xz
linux-44c5ba96ec1083b7694a88fd99c3012213314b82.zip
tools: iio: iio_generic_buffer: fix argument '?' option
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> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/iio')
-rw-r--r--tools/iio/iio_generic_buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/iio/iio_generic_buffer.c b/tools/iio/iio_generic_buffer.c
index f39c0e9c0d5c..85e23291d3b9 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;