svn commit: r240898 - in stable/9/sys: amd64/amd64 i386/i386

Dimitry Andric dim at FreeBSD.org
Mon Sep 24 20:05:52 UTC 2012


Author: dim
Date: Mon Sep 24 20:05:52 2012
New Revision: 240898
URL: http://svn.freebsd.org/changeset/base/240898

Log:
  MFC r240773:
  
  After r205013, amd64 and i386 CPU family and model IDs were printed out
  in hexadecimal, but without any 0x prefix, which can be very misleading.

Modified:
  stable/9/sys/amd64/amd64/identcpu.c
  stable/9/sys/i386/i386/identcpu.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/amd64/amd64/identcpu.c
==============================================================================
--- stable/9/sys/amd64/amd64/identcpu.c	Mon Sep 24 20:03:13 2012	(r240897)
+++ stable/9/sys/amd64/amd64/identcpu.c	Mon Sep 24 20:05:52 2012	(r240898)
@@ -213,8 +213,8 @@ printcpuinfo(void)
 	if (cpu_vendor_id == CPU_VENDOR_INTEL ||
 	    cpu_vendor_id == CPU_VENDOR_AMD ||
 	    cpu_vendor_id == CPU_VENDOR_CENTAUR) {
-		printf("  Family = %x", CPUID_TO_FAMILY(cpu_id));
-		printf("  Model = %x", CPUID_TO_MODEL(cpu_id));
+		printf("  Family = 0x%x", CPUID_TO_FAMILY(cpu_id));
+		printf("  Model = 0x%x", CPUID_TO_MODEL(cpu_id));
 		printf("  Stepping = %u", cpu_id & CPUID_STEPPING);
 
 		/*

Modified: stable/9/sys/i386/i386/identcpu.c
==============================================================================
--- stable/9/sys/i386/i386/identcpu.c	Mon Sep 24 20:03:13 2012	(r240897)
+++ stable/9/sys/i386/i386/identcpu.c	Mon Sep 24 20:05:52 2012	(r240898)
@@ -688,8 +688,8 @@ printcpuinfo(void)
 	    cpu_vendor_id == CPU_VENDOR_NSC ||
 		(cpu_vendor_id == CPU_VENDOR_CYRIX &&
 		 ((cpu_id & 0xf00) > 0x500))) {
-		printf("  Family = %x", CPUID_TO_FAMILY(cpu_id));
-		printf("  Model = %x", CPUID_TO_MODEL(cpu_id));
+		printf("  Family = 0x%x", CPUID_TO_FAMILY(cpu_id));
+		printf("  Model = 0x%x", CPUID_TO_MODEL(cpu_id));
 		printf("  Stepping = %u", cpu_id & CPUID_STEPPING);
 		if (cpu_vendor_id == CPU_VENDOR_CYRIX)
 			printf("\n  DIR=0x%04x", cyrix_did);


More information about the svn-src-all mailing list