summaryrefslogtreecommitdiff
path: root/com32/gpllib
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2011-04-16 20:34:40 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2011-04-16 20:34:40 +0200
commit2a931e3db50a57afc1eb3a6f6449d635eafdf145 (patch)
treea0cae06373c4145b23e252a53f8783f95e8aa7d5 /com32/gpllib
parent42018413878117f299c2baf54f5dce84f327244e (diff)
downloadsyslinux-2a931e3db50a57afc1eb3a6f6449d635eafdf145.tar.gz
cpuid: Using generic model if cyrix id is unknown
When using the specific Cyrix call to determine the model, if the model is unknown, let's consider the generic call was right. This insure a better display of the model id.
Diffstat (limited to 'com32/gpllib')
-rw-r--r--com32/gpllib/cpuid.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/com32/gpllib/cpuid.c b/com32/gpllib/cpuid.c
index ee82b6e2..2abd0bda 100644
--- a/com32/gpllib/cpuid.c
+++ b/com32/gpllib/cpuid.c
@@ -325,10 +325,13 @@ void detect_cyrix(struct cpuinfo_x86 *c) {
dir0_msn = 7;
break;
}
-
- strcpy(buf, Cx86_model[dir0_msn & 7]);
- if (p) strcat(buf, p);
+ /* If the processor is unknown, we keep the model name we got
+ * from the generic call */
+ if (dir0_msn < 7) {
+ strcpy(buf, Cx86_model[dir0_msn & 7]);
+ if (p) strcat(buf, p);
+ }
}
void generic_identify(struct cpuinfo_x86 *c)