Lines Matching defs:file
20 * helper function to check whether a file under "../cpuX/cpuidle/stateX/" dir
26 * returns 1 if the file exists, 0 otherwise.
45 * helper function to read file from /sys into given buffer
80 * helper function to write a new value to a /sys file
286 char file[SYSFS_PATH_MAX];
291 snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU "cpuidle");
292 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode))
295 snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU "cpu%u/cpuidle/state0", cpu);
296 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode))
299 while (stat(file, &statbuf) == 0 && S_ISDIR(statbuf.st_mode)) {
300 snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU
311 * helper function to read file from /sys into given buffer