13 lines
364 B
C
Raw Normal View History

2026-01-21 18:59:54 +08:00
/* SPDX-License-Identifier: GPL-2.0 */
#define PATH_TO_CPU "/sys/devices/system/cpu/"
2026-01-29 22:25:33 +08:00
#ifndef MAX_LINE_LEN
2026-01-21 18:59:54 +08:00
#define MAX_LINE_LEN 4096
2026-01-29 22:25:33 +08:00
#endif
2026-01-21 18:59:54 +08:00
#define SYSFS_PATH_MAX 255
2026-01-29 22:25:33 +08:00
int is_valid_path(const char *path);
2026-01-21 18:59:54 +08:00
unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen);
2026-01-29 22:25:33 +08:00
unsigned int cpupower_write_sysfs(const char *path, char *buf, size_t buflen);