From db5fffd5b1e414037d76a08ed57dd9c7b2c6d5b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Mon, 31 Jul 2023 17:49:04 +0200 Subject: [PATCH] lsclocks: don't fail without dynamic clocks MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Weißschuh --- misc-utils/lsclocks.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc-utils/lsclocks.c b/misc-utils/lsclocks.c index ec27b9a155..665d02be10 100644 --- a/misc-utils/lsclocks.c +++ b/misc-utils/lsclocks.c @@ -406,7 +406,9 @@ static void add_dynamic_clocks_from_discovery(struct libscols_table *tb, glob_t state; rc = glob("/dev/ptp*", 0, NULL, &state); - if (rc) + if (rc == GLOB_NOMATCH) + return; + else if (rc) errx(EXIT_FAILURE, _("Could not glob: %d"), rc); for (i = 0; i < state.gl_pathc; i++) -- 2.47.2