mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
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>
This commit is contained in:
parent
59dc1c8619
commit
44c5ba96ec
1 changed files with 1 additions and 1 deletions
|
@ -352,7 +352,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
register_cleanup();
|
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) {
|
switch (c) {
|
||||||
case 'a':
|
case 'a':
|
||||||
autochannels = AUTOCHANNELS_ENABLED;
|
autochannels = AUTOCHANNELS_ENABLED;
|
||||||
|
|
Loading…
Reference in a new issue