mirror of
https://github.com/FeralInteractive/gamemode.git
synced 2025-06-07 08:07:20 +02:00
Allow execution without any cpu governors to set - for issue #44
This commit is contained in:
parent
5ee3ab71ce
commit
da703ce4c0
@ -50,12 +50,14 @@ int fetch_governors(char governors[MAX_GOVERNORS][MAX_GOVERNOR_LENGTH])
|
|||||||
|
|
||||||
/* Assert some sanity on this glob */
|
/* Assert some sanity on this glob */
|
||||||
if (glob(path, GLOB_NOSORT, NULL, &glo) != 0) {
|
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) {
|
if (glo.gl_pathc < 1) {
|
||||||
globfree(&glo);
|
globfree(&glo);
|
||||||
FATAL_ERROR("cpu device path not found");
|
LOG_ERROR("no cpu governors found\n");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int num_governors = 0;
|
int num_governors = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user