garbage string as cpu identifier
Doom Neine
shockwavebsd at yahoo.com
Tue Mar 9 15:46:14 PST 2004
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 <br260 at cam.ac.uk> 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 youre looking for faster
http://search.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: identcpu.c.rej
Type: application/octet-stream
Size: 783 bytes
Desc: identcpu.c.rej
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040309/e80c6c36/identcpu.c.obj
More information about the freebsd-current
mailing list