Hey Leute,

habe das Problem mit xosview geloest, nachdem man mir mitteilte das es
an einer zu langen Zeile in /proc/stat liegt.
Einfach den patch mit

cd xosview-1.7.0
patch -p1 < patchfile

auf die Sourcen loslassen, neu kompilieren, geht.

Gruss, Jan

Hier der PATCH:

----8<-----8<--------------------------------------


diff -U2 -r xosview-1.7.0/linux/cpumeter.cc
xosview-1.7.0-mod/linux/cpumeter.cc
--- xosview-1.7.0/linux/cpumeter.cc     Mon Feb  1 09:18:49 1999
+++ xosview-1.7.0-jmwk/linux/cpumeter.cc        Sun Feb 28 02:20:22 1999
@@ -50,5 +50,5 @@
 void CPUMeter::getcputime( void ){
   total_ = 0;
-  char tmp[256];
+  char tmp[512];
   ifstream stats( STATFILENAME );
 
@@ -60,5 +60,5 @@
   // read until we are at the right line.
   for (int i = 0 ; i < _lineNum ; i++)
-    stats.getline(tmp, 256);
+    stats.getline(tmp, 512);
 
   stats >>tmp >>cputime_[cpuindex_][0]  
@@ -88,7 +88,7 @@
 
   int line = -1;
-  char buf[256];
+  char buf[512];
   while (!stats.eof()){
-    stats.getline(buf, 256);
+    stats.getline(buf, 512);
     if (!stats.eof()){
       line++;
@@ -113,7 +113,7 @@
 
   int cpuCount = 0;
-  char buf[256];
+  char buf[512];
   while (!stats.eof()){
-    stats.getline(buf, 256);
+    stats.getline(buf, 512);
     if (!stats.eof()){
       if (!strncmp(buf, "cpu", 3) && buf[3] != ' ')
@@ -138,6 +138,6 @@
 
 const char *CPUMeter::toUpper(const char *str){
-  static char buffer[256];
-  strncpy(buffer, str, 256);
+  static char buffer[512];
+  strncpy(buffer, str, 512);
   for (char *tmp = buffer ; *tmp != '\0' ; tmp++)
     *tmp = toupper(*tmp);





----8<-----8<--------------------------------------

--
Um aus der Liste ausgetragen zu werden, eine Mail an [EMAIL PROTECTED]
schicken, mit dem Text: unsubscribe suse-linux

Antwort per Email an