aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-03-15 09:34:56 +0100
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-03-15 19:36:24 +0100
commit1960b3b1073122b1af38856f7880e29ccff54d3f (patch)
treeacdfeae9a67c87dd0e6efa0ed9cef93dd84927ca
parent3c55c6f3e0c94333acf6f3da1e96ef17fd430887 (diff)
downloadlibgpiod-1960b3b1073122b1af38856f7880e29ccff54d3f.tar.gz
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 <bartosz.golaszewski@linaro.org> Reported-by: Wes Tarro <wes.tarro@azuresummit.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r--tools/gpiomon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gpiomon.c b/tools/gpiomon.c
index ec177dfd..c2684c2a 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);