Package: sysinfo / 0.7-8

13-fix-reordered-cpuinfo.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: Chow Loong Jin <hyperair@debian.org>
Description: Fix assumption that "cpu MHz" comes before bogomips in
 /proc/cpuinfo
Index: sysinfo/Sysinfo/CpuInfo.cs
===================================================================
--- sysinfo.orig/Sysinfo/CpuInfo.cs	2012-01-11 02:07:35.631328013 +0800
+++ sysinfo/Sysinfo/CpuInfo.cs	2012-01-11 02:07:57.994751754 +0800
@@ -85,6 +85,7 @@
 			
 			String temp;
 			Boolean dynamicB = true;
+			Boolean dynamicF = true;
 			
 			try {
 				
@@ -99,8 +100,10 @@
 							break;
 						
 						//frequency
-						if ( temp.StartsWith("cpu MHz"))
+						if ( temp.StartsWith("cpu MHz")) {
 							cpu_frequency =  temp.Remove(0, 11) + " MHz";
+							dynamicF = false;
+						}
 						
 						//bogomips
 						if ( temp.StartsWith("bogomips")) {