From: Thomas Weißschuh Date: Mon, 31 Jul 2023 15:49:04 +0000 (+0200) Subject: lsclocks: don't fail without dynamic clocks X-Git-Tag: v2.40-rc1~317 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db5fffd5b1e414037d76a08ed57dd9c7b2c6d5b5;p=thirdparty%2Futil-linux.git lsclocks: don't fail without dynamic clocks Signed-off-by: Thomas Weißschuh --- 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++)