/[projects]/wxCpuThrottle/src/acpiparser.cpp
ViewVC logotype

Diff of /wxCpuThrottle/src/acpiparser.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 25 by torben, Fri Aug 10 18:12:36 2007 UTC revision 326 by torben, Wed Sep 16 18:47:18 2009 UTC
# Line 23  Line 23 
23  #include <fstream>  #include <fstream>
24  #include <sstream>  #include <sstream>
25  #include <stdexcept>  #include <stdexcept>
26    #include <stdlib.h>
27    
28  AcpiParser::AcpiParser()  AcpiParser::AcpiParser()
29  {  {
# Line 40  void AcpiParser::ReadAcpiFile() Line 41  void AcpiParser::ReadAcpiFile()
41          char buffer[1024];          char buffer[1024];
42          std::ifstream in;          std::ifstream in;
43                    
44          in.open("/proc/acpi/processor/CPU1/throttling");          in.open("/proc/acpi/processor/CPU0/throttling");
45          if  (!in)          if  (!in)
46                  throw std::runtime_error("Could not open file");                  throw std::runtime_error("Could not open file");
47                    
# Line 73  void AcpiParser::ReadAcpiFile() Line 74  void AcpiParser::ReadAcpiFile()
74                                  //std::cout << "tmp: >" << tmp << "< = " << std::endl;                                  //std::cout << "tmp: >" << tmp << "< = " << std::endl;
75                                  break;                                  break;
76                          }                          }
77                            case 3:
78                                    break;
79                          default:                          default:
80                                  mStateDescriptions.push_back( value );                                                            mStateDescriptions.push_back( value );                          
81                  }                  }
# Line 113  void AcpiParser::SetState(int newState) Line 116  void AcpiParser::SetState(int newState)
116                  throw std::invalid_argument("newState too small");                  throw std::invalid_argument("newState too small");
117                    
118          std::ofstream out;          std::ofstream out;
119          out.open("/proc/acpi/processor/CPU1/throttling");          out.open("/proc/acpi/processor/CPU0/throttling");
120                    
121          if (!out)          if (!out)
122                  throw std::runtime_error("Could not open file");                  throw std::runtime_error("Could not open file");

Legend:
Removed from v.25  
changed lines
  Added in v.326

  ViewVC Help
Powered by ViewVC 1.1.20