From: Bartosz Golaszewski Date: Fri, 6 Jan 2017 16:56:28 +0000 (+0100) Subject: gpioget: fix help message X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5d47d7d8e484d31c89316469fb6050b2a1ddc03e;p=qemu-gpiodev%2Flibgpiod.git gpioget: fix help message Also: add a space for readability. Signed-off-by: Bartosz Golaszewski --- diff --git a/gpioget.c b/gpioget.c index 746c36f..f82ddde 100644 --- a/gpioget.c +++ b/gpioget.c @@ -27,7 +27,7 @@ static void print_help(void) { printf("Usage: %s [CHIP NAME/NUMBER] [LINE OFFSET] \n", get_progname()); - printf("List all GPIO chips\n"); + printf("Read value from a GPIO line\n"); printf("Options:\n"); printf(" -h, --help:\t\tdisplay this message and exit\n"); printf(" -l, --active-low:\tset the line active state to low\n"); @@ -71,6 +71,7 @@ int main(int argc, char **argv) die("gpio line offset must be specified"); device = argv[0]; + offset = strtoul(argv[1], &end, 10); if (*end != '\0') die("invalid GPIO offset: %s", argv[1]);