Lines Matching defs:file
64 * -> cpuX directory exists, but not cpuX/online file
95 * helper function to check whether a file under "../cpuX/cpuidle/stateX/" dir
101 * returns 1 if the file exists, 0 otherwise.
119 * helper function to read file from /sys into given buffer
151 * helper function to write a new value to a /sys file
356 char file[SYSFS_PATH_MAX];
361 snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU "cpuidle");
362 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode))
365 snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU "cpu%u/cpuidle/state0", cpu);
366 if (stat(file, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode))
369 while (stat(file, &statbuf) == 0 && S_ISDIR(statbuf.st_mode)) {
370 snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU
381 * helper function to read file from /sys into given buffer