diff -Naur wmlaptop-1.3/src/argsConfig.h wmlaptop-1.3_new/src/argsConfig.h --- wmlaptop-1.3/src/argsConfig.h 2004-05-11 16:13:39.000000000 +0200 +++ wmlaptop-1.3_new/src/argsConfig.h 2009-06-22 17:48:05.000000000 +0200 @@ -17,6 +17,9 @@ #ifndef __ARGSCONFIG_H__ #define __ARGSCONFIG_H__ +/* set the number of cpu's */ +#define NUMBER_OF_CPUS 2 + /* uncomment following lines to open by default wmlaptop * on another X-Server */ //#define ARGSDEF_XDISPLAYNAME "192.168.0.2:0.0" diff -Naur wmlaptop-1.3/src/cpu.c wmlaptop-1.3_new/src/cpu.c --- wmlaptop-1.3/src/cpu.c 2004-05-11 08:08:32.000000000 +0200 +++ wmlaptop-1.3_new/src/cpu.c 2009-06-22 17:44:49.000000000 +0200 @@ -130,12 +130,11 @@ FILE * fp; char red[10]; - if( (fp = fopen( cpuState.setFreqFile, "r" )) == NULL ) + if( (fp = fopen( cpuState.setFreqFile[0], "r" )) == NULL ) { - fprintf(stderr, "Error reading the info file (%s):\n%s\n", cpuState.setFreqFile, strerror(errno) ); + fprintf(stderr, "Error reading the info file (%s):\n%s\n", cpuState.setFreqFile[0], strerror(errno) ); free_and_exit( ERROR ); } - fgets ( red, 10, fp ); cpuState.actualFreq = atoi ( red ); @@ -226,21 +225,25 @@ void cpuEchoFreq() { FILE * fp; + int i; #ifdef DEBUG printf("cpuEchoFreq() called: %u\n", cpuState.setFreq ); #endif - if( (fp = fopen( cpuState.setFreqFile, "w" )) == NULL ) - { - fprintf(stderr, "Error writing the new freq (%d) in the file (%s):\n%s\n", \ - cpuState.setFreq, cpuState.setFreqFile, strerror(errno) ); - free_and_exit( ERROR ); - } - - fprintf( fp, "%u", cpuState.setFreq ); - - fclose ( fp ); + for (i=0; i