# Description: Not all ppc machines print bogomips, thus breaking counting on 
#  SMP
# Author: Helge Kreutzmann <debian@helgefjell.de>
# Last-Update: 2005-11-18

Index: linuxinfo-1.1.8-29/linuxinfo_ppc.c
===================================================================
--- linuxinfo-1.1.8-29.orig/linuxinfo_ppc.c	2010-02-01 21:37:33.594959545 +0100
+++ linuxinfo-1.1.8-29/linuxinfo_ppc.c	2010-02-01 21:37:09.491324000 +0100
@@ -11,6 +11,8 @@
         1.0.0   AIB     199803??        Initial development
 	1.0.1	AIB	20000405	Rewritten
 	1.0.2	AIB	20010909	Added getphysicalmemory() call
+	1.0.3   KRE     20050328        Fix multicpu-detection without bogomips
+	1.0.4   KRE     20051118        Include <string.h>
 
         This is the PPC port of linuxinfo
 */
@@ -18,6 +20,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/stat.h>
+#include <string.h>
 
 #include "linuxinfo.h"
 
@@ -36,8 +39,12 @@
 	{
 		splitstring(temp_string, temp_string2);
 
-		if (!(strncmp(temp_string, "cpu", strlen("cpu"))) && (processors == 0))
-			strcpy(chip, temp_string2);
+		//if (!(strncmp(temp_string, "cpu", strlen("cpu"))) && (processors == 0))
+		if (!(strncmp(temp_string, "cpu", strlen("cpu"))))
+		{
+			if (processors == 0) strcpy(chip, temp_string2);
+			processors++;
+		}
 
 		if (!(strncmp(temp_string, "model", strlen("model"))))
 			strcpy(vendor, temp_string2);
@@ -50,7 +57,6 @@
 
 		if (!(strncmp(temp_string, "bogomips", strlen("bogomips"))))
 		{
-			processors++;
 			sscanf(temp_string2, "%f", &tempbogo);
 		}
 	}
