[syslinux:master] cpuid: Using generic model if cyrix id is unknown

syslinux-bot for Erwan Velu erwanaliasr1 at gmail.com
Mon Apr 25 15:29:09 PDT 2011


Commit-ID:  2a931e3db50a57afc1eb3a6f6449d635eafdf145
Gitweb:     http://syslinux.zytor.com/commit/2a931e3db50a57afc1eb3a6f6449d635eafdf145
Author:     Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Sat, 16 Apr 2011 20:34:40 +0200
Committer:  Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Sat, 16 Apr 2011 20:34:40 +0200

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.


---
 com32/gpllib/cpuid.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/com32/gpllib/cpuid.c b/com32/gpllib/cpuid.c
index ee82b6e..2abd0bd 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)



More information about the Syslinux-commits mailing list