From: Bartosz Golaszewski Date: Wed, 15 Mar 2023 08:34:56 +0000 (+0100) Subject: tools: gpiomon: fix setting event clock type X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1960b3b1073122b1af38856f7880e29ccff54d3f;p=qemu-gpiodev%2Flibgpiod.git tools: gpiomon: fix setting event clock type Fix an inverted logic bug when parsing event clock type in gpiomon. Fixes: 8ffb6489286f ("tools: line name focussed rework") Signed-off-by: Bartosz Golaszewski Reported-by: Wes Tarro Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko --- diff --git a/tools/gpiomon.c b/tools/gpiomon.c index ec177df..c2684c2 100644 --- a/tools/gpiomon.c +++ b/tools/gpiomon.c @@ -99,7 +99,7 @@ static int parse_event_clock_or_die(const char *option) { if (strcmp(option, "realtime") == 0) return GPIOD_LINE_CLOCK_REALTIME; - if (strcmp(option, "hte") != 0) + if (strcmp(option, "hte") == 0) return GPIOD_LINE_CLOCK_HTE; if (strcmp(option, "monotonic") != 0) die("invalid event clock: %s", option);