From da703ce4c0d68f3940b225a68ce9f403ec8e54c3 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Fri, 11 May 2018 08:51:56 +0100 Subject: [PATCH] Allow execution without any cpu governors to set - for issue #44 --- daemon/governors-query.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/daemon/governors-query.c b/daemon/governors-query.c index cd9700e..3faa97f 100644 --- a/daemon/governors-query.c +++ b/daemon/governors-query.c @@ -50,12 +50,14 @@ int fetch_governors(char governors[MAX_GOVERNORS][MAX_GOVERNOR_LENGTH]) /* Assert some sanity on this glob */ if (glob(path, GLOB_NOSORT, NULL, &glo) != 0) { - FATAL_ERRORNO("Broken glob implementation"); + LOG_ERROR("glob failed for cpu governors: (%s)\n", strerror(errno)); + return 0; } if (glo.gl_pathc < 1) { globfree(&glo); - FATAL_ERROR("cpu device path not found"); + LOG_ERROR("no cpu governors found\n"); + return 0; } int num_governors = 0;