From 956a6261ebfdf8fb3346b8935d0ec59c1c26df7c Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 1 Sep 2015 17:23:34 +1200 Subject: Cleaning up common functions --- getgov.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'getgov.c') diff --git a/getgov.c b/getgov.c index cff7329..df648a4 100644 --- a/getgov.c +++ b/getgov.c @@ -60,7 +60,7 @@ bool gg_current(int core, char* out, int size) char *path; asprintf(&path, "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor", core); - if (!(fd = check_for_file(path))) + if (!(fd = fopen(path, "r"))) { free(path); return false; @@ -89,7 +89,7 @@ bool gg_available(int core, char* out, int size) FILE *fd; asprintf(&path, "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_available_governors", core); - if (!(fd = check_for_file(path))) + if (!(fd = fopen(path, "r"))) { free(path); return false; -- cgit v1.1