From owner-freebsd-current@FreeBSD.ORG Tue Mar 9 15:21:06 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E2A716A4CE for ; Tue, 9 Mar 2004 15:21:06 -0800 (PST) Received: from plum.csi.cam.ac.uk (plum.csi.cam.ac.uk [131.111.8.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D92B43D1F for ; Tue, 9 Mar 2004 15:21:06 -0800 (PST) (envelope-from br260@hermes.cam.ac.uk) Received: from maroon.csi.cam.ac.uk ([131.111.8.2]) by plum.csi.cam.ac.uk with esmtp (Exim 4.20) id 1B0qX3-0003mB-3I; Tue, 09 Mar 2004 23:21:05 +0000 Received: from prayer by maroon.csi.cam.ac.uk with local (Exim 4.24) id 1B0qX3-0000br-1g; Tue, 09 Mar 2004 23:21:05 +0000 From: Bin Ren To: shockwavebsd@yahoo.com Date: 09 Mar 2004 23:21:04 +0000 X-Mailer: Prayer v1.0.9 X-Originating-IP: [131.111.242.109] Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Message-Id: X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned cc: freebsd-current@freebsd.org Subject: Re: garbage string as cpu identifier X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Mar 2004 23:21:06 -0000 Try: save the patch as patch-identcpu cp patch-identcpu /usr/src/sys/i386/i386 cd /usr/src/sys/i386/i386 patch < patch-identcpu then compile your kernel and reboot. I expect to see your CPU ID as: "garbage chars from cpuid" Please try and see whether this is the case. -- Bin --- identcpu.c Fri Mar 5 03:28:32 2004 +++ identcpu.c.new Tue Mar 9 23:11:53 2004 @@ -572,8 +572,17 @@ brand = cpu_brand; while (*brand == ' ') ++brand; - if (*brand != '\0') - strcpy(cpu_model, brand); + if (*brand != '\0') { + char *c; + for (c = brand; c < cpu_brand+48 && *c; c++) + if (*c < '!' || *c > '~') + break; + + if (c < cpu_brand+48 && *c) + strcpy(cpu_model, "garbage chars from cpuid"); + else + strcpy(cpu_model, brand); + } #endif