瀏覽代碼

Allow execution without any cpu governors to set - for issue #44

Marc Di Luzio 6 年之前
父節點
當前提交
da703ce4c0
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      daemon/governors-query.c

+ 4 - 2
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;