From owner-freebsd-current@FreeBSD.ORG Tue Mar 9 15:46:13 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 E895B16A4CE for ; Tue, 9 Mar 2004 15:46:13 -0800 (PST) Received: from web13125.mail.yahoo.com (web13125.mail.yahoo.com [216.136.174.143]) by mx1.FreeBSD.org (Postfix) with SMTP id D8AA543D2D for ; Tue, 9 Mar 2004 15:46:13 -0800 (PST) (envelope-from shockwavebsd@yahoo.com) Message-ID: <20040309234613.94128.qmail@web13125.mail.yahoo.com> Received: from [128.238.23.202] by web13125.mail.yahoo.com via HTTP; Tue, 09 Mar 2004 15:46:13 PST Date: Tue, 9 Mar 2004 15:46:13 -0800 (PST) From: Doom Neine To: Bin Ren In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1095559054-1078875973=:93519" 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:46:14 -0000 --0-1095559054-1078875973=:93519 Content-Type: text/plain; charset=us-ascii Content-Id: Content-Disposition: inline sorry but it failed with the following: Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- identcpu.c Fri Mar 5 03:28:32 2004 |+++ identcpu.c.new Tue Mar 9 23:11:53 2004 ------------------------- Patching file identcpu.c using Plan A... Hunk #1 failed at 572. 1 out of 1 hunks failed--saving rejects to identcpu.c.rej done i haven't looked through this identcpu.c.rej yet but i'm attaching it to this email thanks --- Bin Ren wrote: > 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 > > __________________________________ Do you Yahoo!? Yahoo! Search - Find what you’re looking for faster http://search.yahoo.com --0-1095559054-1078875973=:93519 Content-Type: application/octet-stream; name="identcpu.c.rej" Content-Transfer-Encoding: base64 Content-Description: identcpu.c.rej Content-Disposition: attachment; filename="identcpu.c.rej" KioqKioqKioqKioqKioqDQoqKiogNTcyLDU3OSAqKioqDQogICAgICAgICBi cmFuZCA9IGNwdV9icmFuZDsNDQogICAgICAgICB3aGlsZSAoKmJyYW5kID09 ICcgJykNDQogICAgICAgICAgICAgICAgICsrYnJhbmQ7DQ0KLSAgICAgICAg aWYgKCpicmFuZCAhPSAnXDAnKQ0NCi0gICAgICAgICAgICAgICAgc3RyY3B5 KGNwdV9tb2RlbCwgYnJhbmQpOw0NCiAgIA0NCiAgI2VuZGlmICANCi0tLSA1 NzIsNTg4IC0tLS0NCiAgICAgICAgIGJyYW5kID0gY3B1X2JyYW5kOw0NCiAg ICAgICAgIHdoaWxlICgqYnJhbmQgPT0gJyAnKQ0NCiAgICAgICAgICAgICAg ICAgKyticmFuZDsNDQorICAgICAgICBpZiAoKmJyYW5kICE9ICdcMCcpIHsN DQorICAgICAgICAgICAgICAgIGNoYXIgKmM7DQ0KKyAgICAgICAgICAgICAg ICBmb3IgKGMgPSBicmFuZDsgYyA8IGNwdV9icmFuZCs0OCAmJiAqYzsgYysr KQ0NCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKmMgPCAnIScgfHwg KmMgPiAnficpDQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg YnJlYWs7DQ0KKyANDQorICAgICAgICAgICAgICAgIGlmIChjIDwgY3B1X2Jy YW5kKzQ4ICYmICpjKQ0NCisgICAgICAgICAgICAgICAgICAgICAgICBzdHJj cHkoY3B1X21vZGVsLCAiZ2FyYmFnZSBjaGFycyBmcm9tIGNwdWlkIik7DQ0K KyAgICAgICAgICAgICAgICBlbHNlDQ0KKyAgICAgICAgICAgICAgICAgICAg ICAgIHN0cmNweShjcHVfbW9kZWwsIGJyYW5kKTsNDQorICAgICAgICB9DQ0K ICAgDQ0KICAjZW5kaWYgIA0K --0-1095559054-1078875973=:93519--