Don't prepend proc with TARGET_DIR_ROOT

Should make future packaging for termux simpler
This commit is contained in:
Linus Dierheimer
2022-05-23 20:01:18 +02:00
parent 60af0b9e39
commit ea44231c78
6 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -9,10 +9,10 @@
void ffPrintCPUUsage(FFinstance* instance)
{
long user, nice, system, idle, iowait, irq, softirq;
FILE* procStat = fopen(FASTFETCH_TARGET_DIR_ROOT"/proc/stat", "r");
FILE* procStat = fopen("/proc/stat", "r");
if(procStat == NULL)
{
ffPrintError(instance, FF_CPU_USAGE_MODULE_NAME, 0, &instance->config.cpuUsageKey, &instance->config.cpuUsageFormat, FF_CPU_USAGE_NUM_FORMAT_ARGS, "fopen(\""FASTFETCH_TARGET_DIR_ROOT"/proc/stat\", \"r\") == NULL");
ffPrintError(instance, FF_CPU_USAGE_MODULE_NAME, 0, &instance->config.cpuUsageKey, &instance->config.cpuUsageFormat, FF_CPU_USAGE_NUM_FORMAT_ARGS, "fopen(\"""/proc/stat\", \"r\") == NULL");
return;
}
if (fscanf(procStat, "cpu%ld%ld%ld%ld%ld%ld%ld", &user, &nice, &system, &idle, &iowait, &irq, &softirq) < 0) goto exit;