aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-12-13 08:04:10 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-12-13 08:04:10 +0000
commitd439ed55156c6a05c37ef1fcae6fc8db529b9d47 (patch)
tree95f7a92af485674713138d297bfd9cbfd9b485d5
parent2425078e6f48d6429cc9d0bdda7fcddb291e27cc (diff)
downloadenlightenment-d439ed55156c6a05c37ef1fcae6fc8db529b9d47.tar.gz
enlightenment-d439ed55156c6a05c37ef1fcae6fc8db529b9d47.tar.xz
enlightenment-d439ed55156c6a05c37ef1fcae6fc8db529b9d47.zip
fix cpufreq poll - it kepts saying there is a new freq, making the
animator spin etc. etc. SVN revision: 55533
-rw-r--r--src/modules/cpufreq/e_mod_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/cpufreq/e_mod_main.c b/src/modules/cpufreq/e_mod_main.c
index 27656ee28..4d2f463c6 100644
--- a/src/modules/cpufreq/e_mod_main.c
+++ b/src/modules/cpufreq/e_mod_main.c
@@ -713,16 +713,20 @@ _cpufreq_status_check_current(Status *s)
f = fopen("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", "r");
if (f)
{
+ char *p;
+
+ buf[0] = 0;
fgets(buf, sizeof(buf), f);
buf[sizeof(buf) - 1] = 0;
fclose(f);
+ for (p = buf; (*p != 0) && (isalnum(*p)); p++);
+ *p = 0;
if ((!s->cur_governor) || (strcmp(buf, s->cur_governor)))
{
ret = 1;
- if (s->cur_governor)
- free(s->cur_governor);
+ if (s->cur_governor) free(s->cur_governor);
s->cur_governor = strdup(buf);
for (i = strlen(s->cur_governor) - 1; i >= 0; i--)