]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsclocks: don't fail without dynamic clocks
authorThomas Weißschuh <thomas@t-8ch.de>
Mon, 31 Jul 2023 15:49:04 +0000 (17:49 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 31 Jul 2023 15:49:04 +0000 (17:49 +0200)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
misc-utils/lsclocks.c

index ec27b9a1557637eba871807860e5b8772a4f6e09..665d02be10cedeba9b0fc1d69a8f2161252179f0 100644 (file)
@@ -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++)