gpiofind: tweak the error message on invalid arguments
authorBartosz Golaszewski <bartekgola@gmail.com>
Mon, 12 Jun 2017 10:41:48 +0000 (12:41 +0200)
committerBartosz Golaszewski <bartekgola@gmail.com>
Mon, 12 Jun 2017 10:41:48 +0000 (12:41 +0200)
We print the same error message in case of too many or not enough
arguments. Make the message appropriate for both cases.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
src/tools/gpiofind.c

index da285d3f58f7befb18ec9499be38b0e3c9361b48..9fbea7ab6e3eba4eef189ac6db91d8dd0aebf9fb 100644 (file)
@@ -63,7 +63,7 @@ int main(int argc, char **argv)
        argv += optind;
 
        if (argc != 1)
-               die("GPIO line name must be specified");
+               die("exactly one GPIO line name must be specified");
 
        line = gpiod_line_find_by_name(argv[0]);
        if (!line)