Package: linuxinfo / 1.1.8-34

22_update_x86 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Description: Add new models and fix model detection, use <string.h>
#  Added Athlon XP and MP (by Ola Lundqvist <opal@debian.org>)
#  Other added by Helge Kreutzmann 
#  Fix model detection (else Pentium MMX -> Xeon!)
#  Add lots of x86_64 models
#  One more Pentium4, Celeron M
#  Include <string.h>
#  Added semprons
#  One more am64 and one pentium M added
# Author: Ola Lundqvist <opal@debian.org>
# Author: Helge Kreutzmann <debian@helgefjell.de>
# Last-Update: 2010-02-28

Index: linuxinfo-1.1.8/linuxinfo_intel.c
===================================================================
--- linuxinfo-1.1.8.orig/linuxinfo_intel.c	2002-02-04 23:43:55.000000000 +0100
+++ linuxinfo-1.1.8/linuxinfo_intel.c	2010-02-28 21:25:35.000000000 +0100
@@ -13,12 +13,33 @@
 	1.0.2	AIB	20000527	Added AMD K7
 	1.0.3	AIB	20000815	Added AMD K6-3 500MHz
 	1.0.4	AIB	20010909	Added getphysicalmemory() call
+	1.0.5   OPAL    20030417        Added Athlon XP and MP.
+	1.0.6   KRE     20040711        Added Opteron
+	1.0.7   KRE     20040726        Added Pentium M
+	1.0.8   KRE     20040809        Add further machines (Athlons, Xeons,
+					Pentium 4s, Celerons), fix detection of
+					Pentium MMX
+	1.0.9   KRE     20050215        Added several amd64 machines
+	1.0.10  KRE     20051106        Added another Pentium4 machine
+	1.0.11  KRE     20051113        Added another Celeron machine
+	1.0.12  KRE     20051120        Include <string.h>
+	1.0.13  KRE     20060212        Add an AMP sempron cpu
+	1.0.14  KRE     20060423        Add another AMD Sempron
+	1.0.15  KRE     20060724        One more am64 and one pentium M added
+	1.0.16  KRE     20070716        Added a Geode CPU
+	1.0.17  KRE     20070810        Added another Xeon
+	1.0.18  KRE     20080203        Added Core 2 and one more Pentium 4
+	1.0.19  KRE     20090318        Added Core Solo
+	1.0.20  KRE     20090524        Add another Xeon
+	1.0.21  KRE     20090605        Add another Core Duo
+	1.0.22  KRE     20100228        Add another Core Duo
 
-        This is the Intel port of linuxinfo
+        This is the x86 port of linuxinfo
 */
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "linuxinfo.h"
 
@@ -45,11 +66,31 @@
 	"AMD-K6(tm)-III", "K6-3 (3DNowExt)",
 	"AMD-K7(tm)", "K7",
 	"Athlon", "Athlon",
+	"AMD Athlon(tm) processor", "Athlon",
+        "AMD Athlon(tm) Processor", "Athlon",
+        "AMD Athlon(TM) XP", "Athlon XP",
+        "AMD Athlon(tm) XP 1600+", "Athlon XP",
+        "AMD Athlon(TM) MP", "Athlon MP",
+	"AMD Opteron(tm) Processor 240", "Opteron",
+	"AMD Opteron(tm) Processor 242", "Opteron",
+	"AMD Opteron(tm) Processor 244", "Opteron",
+	"AMD Opteron(tm) Processor 246", "Opteron",
+	"AMD Opteron(tm) Processor 248", "Opteron",
+	"AMD Sempron(tm)   2300+", "Sempron",
+	"AMD Sempron(tm)   2600+", "Sempron",
+	"AMD Athlon(tm) 64 Processor 2800+", "x86_64",
+	"AMD Athlon(tm) 64 Processor 3000+", "x86_64",
+	"AMD Athlon(tm) 64 Processor 3200+", "x86_64",
+	"AMD Athlon(tm) 64 Processor 3400+", "x86_64",
+	"AMD Athlon(tm) 64 Processor 3500+", "x86_64",
+	"AMD Athlon(tm) 64 Processor 3700+", "x86_64",
         "Am5x86", "5x86",
         "C6", "C6",
 	"C6-2", "C6-2",
         "6x86", "6x86",
         "6x86MX", "6x86MX",
+        "Geode(TM) Integrated Processor by National Semi", "Geode by Nat. Sem.",
+	"Geode(TM) Integrated Processor by AMD PCS", "Geode by AMD PCS",
         "Pentium 75+", "Pentium",
         "Pentium 75 - 200", "Pentium",
         "Pentium MMX", "Pentium MMX",
@@ -59,8 +100,31 @@
         "Pentium II (Deschutes)", "Pentium II (Deschutes)",
         "Pentium III (Katmai)", "Pentium III (Katmai)",
 	"Pentium III (Coppermine)", "Pentium III (Coppermine)",
+	"Intel(R) Pentium(R) 4 CPU 1.80GHz", "Pentium 4",
+	"Intel(R) Pentium(R) 4 CPU 2.00GHz", "Pentium 4",
+	"Intel(R) Pentium(R) 4 CPU 2.80GHz", "Pentium 4",
+	"Intel(R) Pentium(R) 4 CPU 3.00GHz", "Pentium 4",
+	"Intel(R) Pentium(R) 4 CPU 3.20GHz", "Pentium 4",
+	"Intel(R) Pentium(R) M processor", "Pentium M",
+	"Intel(R) Pentium(R) M processor 1600MHz", "Pentium M",
+	"Intel(R) XEON(TM) CPU 2.20GHz", "Xeon",
+	"Intel(R) XEON(TM) CPU 2.40GHz", "Xeon",
+	"Intel(R) Xeon(TM) CPU 3.20GHz", "Xeon",
+	"Intel(R) Xeon(TM) CPU 3.40GHz", "Xeon",
+	"Intel(R) Xeon(TM) CPU 3.60GHz", "Xeon",
+        "Celeron (Coppermine)", "Celeron (Coppermine)",
         "Celeron (Mendocino)", "Celeron (Mendocino)",
         "Celeron (Covington)", "Celeron (Covington)",
+	"Intel(R) Celeron(R) CPU 1.70GHz", "Celeron",
+	"Intel(R) Celeron(R) CPU 2.20GHz", "Celeron",
+	"Intel(R) Celeron(R) CPU 2.40GHz", "Celeron",
+	"Intel(R) Celeron(R) M processor         1.40GHz", "Celeron M",
+	"Mobile Intel(R) Pentium(R) 4     CPU 3.06GHz", "Pentium-M 4",
+	"Intel(R) Core(TM) Solo CPU     U1400  @ 1.20GHz", "Core Solo",
+	"Intel(R) Core(TM)2 CPU          6600  @ 2.40GHz", "Core 2",
+	"Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz", "Core 2 Duo",
+	"Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz", "Core 2 Duo",
+	"Genuine Intel(R) CPU            2140  @ 1.60GHz", "Pentium 4",
         NULL, NULL
 };
 
@@ -104,12 +168,15 @@
 			if (strncmp(temp_string, "model", strlen("model")) == 0) 
 			{
 				int i = 0;
+				int found = 0;
 		
-				while (models[i] != NULL)
+				while ((models[i] != NULL)&&(!found))
 				{
 					if (strncmp(temp_string2, models[i], strlen(models[i])) == 0)
+					{
 						strcpy(model, models[++i]);
-
+						found=1;
+					}
 					i += 2;
 				}
 			}