From 60c33c4c27c6ca0affa5403c006e7b3ec53d7200 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Wed, 16 Feb 2022 13:23:34 +0000 Subject: [PATCH] iio_info: Remove -s option iio_info had two possible options to scan for contexts: -S (aka. --scan) and -s, which did more or less the same thing, but -s didn't take an argument and scanned all possible contexts. Remove the -s option in the help text to reduce the confusion, while still handling it for backwards-compatibility. Signed-off-by: Paul Cercueil --- man/iio_info.1.in | 2 +- tests/iio_info.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/man/iio_info.1.in b/man/iio_info.1.in index 9fcd5be24..1d5a88aed 100644 --- a/man/iio_info.1.in +++ b/man/iio_info.1.in @@ -78,7 +78,7 @@ normally returned from with no address part .RE .TP -.B \-s, \-\-scan +.B \-S, \-\-scan Scan for available backends .TP .B \-a, \-\-auto diff --git a/tests/iio_info.c b/tests/iio_info.c index 6e98fe2da..f7ba27577 100644 --- a/tests/iio_info.c +++ b/tests/iio_info.c @@ -35,14 +35,12 @@ #endif static const struct option options[] = { - {"scan", no_argument, 0, 's'}, {0, 0, 0, 0}, }; static const char *options_descriptions[] = { "[-x ]\n" "\t\t\t\t[-u ]", - "Scan for available backends.", }; static int dev_is_buffer_capable(const struct iio_device *dev) @@ -59,7 +57,7 @@ static int dev_is_buffer_capable(const struct iio_device *dev) return false; } -#define MY_OPTS "s" +#define MY_OPTS "" int main(int argc, char **argv) { @@ -87,7 +85,7 @@ int main(int argc, char **argv) fprintf(stderr, "Failed to add common options\n"); return EXIT_FAILURE; } - while ((c = getopt_long(argc, argw, "+" COMMON_OPTIONS MY_OPTS, /* Flawfinder: ignore */ + while ((c = getopt_long(argc, argw, "+" COMMON_OPTIONS MY_OPTS "s", /* Flawfinder: ignore */ opts, NULL)) != -1) { switch (c) { /* All these are handled in the common */