Lines Matching refs:filename
57 static int get_cpu_count_from_file(char *filename);
187 static int get_cpu_count_from_file(char *filename) { in get_cpu_count_from_file() argument
192 file = fopen(filename, "r"); in get_cpu_count_from_file()
193 if (!file) die("Could not open %s\n", filename); in get_cpu_count_from_file()
194 if (!fgets(line, MAX_BUF_SIZE, file)) die("Could not get %s contents\n", filename); in get_cpu_count_from_file()
205 die("Unexpected input in file %s (%s).\n", filename, line); in get_cpu_count_from_file()
214 char filename[MAX_BUF_SIZE]; in get_freq_scales_count() local
218 sprintf(filename, "/sys/devices/system/cpu/cpu%d/cpufreq/stats/time_in_state", cpu); in get_freq_scales_count()
219 file = fopen(filename, "r"); in get_freq_scales_count()
220 if (!file) die("Could not open %s\n", filename); in get_freq_scales_count()
265 char filename[MAX_BUF_SIZE]; in read_freq_stats() local
268 sprintf(filename, "/sys/devices/system/cpu/cpu%d/cpufreq/stats/time_in_state", cpu); in read_freq_stats()
269 file = fopen(filename, "r"); in read_freq_stats()
270 if (!file) die("Could not open %s\n", filename); in read_freq_stats()