q66 pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=bc41e68f8058654e86e97f431004873a6b861fc1

commit bc41e68f8058654e86e97f431004873a6b861fc1
Author: Daniel Kolesa <d.kol...@samsung.com>
Date:   Wed Feb 18 11:07:56 2015 +0000

    cpufreq: freebsd fixes
    
    This fixes a sysctlbyname lookup and adds a stub for the "pstate"
    command. Based on a patch contributed by Dmitry Luhtionov.
    
    @fix
---
 src/modules/cpufreq/freqset.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/modules/cpufreq/freqset.c b/src/modules/cpufreq/freqset.c
index 462cc08..5c848be 100644
--- a/src/modules/cpufreq/freqset.c
+++ b/src/modules/cpufreq/freqset.c
@@ -57,9 +57,8 @@ main(int argc, char *argv[])
 #elif defined __FreeBSD__
    if (!strcmp(argv[1], "frequency"))
      {
-        int new_frequency = atoi(argv[2]);
-        size_t len = sizeof(new_frequency);
-        if (sysctlbyname("dev.cpu.0.freq", NULL, 0, &new_frequency, &len) == 
-1)
+        int newfreq = atoi(argv[2]);
+        if (sysctlbyname("dev.cpu.0.freq", NULL, NULL, &newfreq, 
sizeof(newfreq)) == -1)
           {
              fprintf(stderr, "Unable to open frequency interface for 
writing.\n");
              return 1;
@@ -72,6 +71,11 @@ main(int argc, char *argv[])
         fprintf(stderr, "Governors not (yet) implemented on FreeBSD.\n");
         return 0;
      }
+   else if (!strcmp(argv[1], "pstate"))
+     {
+        fprintf(stderr, "Pstates not (yet) implemented on FreeBSD.\n");
+        return 0;
+     }
    else
      {
         fprintf(stderr, "Unknown command.\n");

-- 


Reply via email to