From c848b4bbda542edef51d4b71ac65db4c05355299 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Fri, 6 Jan 2017 15:29:02 +0100 Subject: [PATCH] gpiodetect: handle unrecognized options Signed-off-by: Bartosz Golaszewski --- gpiodetect.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gpiodetect.c b/gpiodetect.c index 8d58219..a5b87f3 100644 --- a/gpiodetect.c +++ b/gpiodetect.c @@ -40,6 +40,10 @@ int main(int argc, char **argv) printf("Usage: %s\n", get_progname()); printf("List all GPIO chips\n"); exit(EXIT_SUCCESS); + case '?': + die("try %s --help", get_progname()); + default: + abort(); } } -- 2.30.2