aboutsummaryrefslogtreecommitdiffstats
path: root/cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpufreq.c')
-rw-r--r--cpufreq.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpufreq.c b/cpufreq.c
index d9e0e4e..75eb774 100644
--- a/cpufreq.c
+++ b/cpufreq.c
@@ -20,6 +20,7 @@ int cpufreq_set_str(char *parameter,char *value,int checkdelay)
{
int fd;
char sysfs_file[128];
+ int done=0;
DEBUG1_CPUFREQ("Set %s to %s\n",parameter,value)
@@ -66,11 +67,14 @@ int cpufreq_set_str(char *parameter,char *value,int checkdelay)
DEBUG1_CPUFREQ("Failed to set %s\n",d->d_name);
return -1;
}
+ done++;
}
bpos+=d->d_reclen;
}
}
close(fd);
+
+ return done;
}
int cpufreq_set_long_int(char *parameter,long int value,int checkdelay)
@@ -78,5 +82,5 @@ int cpufreq_set_long_int(char *parameter,long int value,int checkdelay)
char buf[255];
snprintf(buf,255,"%ld",value);
- cpufreq_set_str(parameter,buf,checkdelay);
+ return cpufreq_set_str(parameter,buf,checkdelay);
}