[haiku-commits] Re: r33470 - haiku/trunk/headers/private/shared

  • From: Hervé W. <h_o_w_@xxxxxxxxxxx>
  • To: <haiku-commits@xxxxxxxxxxxxx>
  • Date: Tue, 6 Oct 2009 21:44:02 +0200

> Author: stippi
> Date: 2009-10-06 19:08:24 +0200 (Tue, 06 Oct 2009)
> New Revision: 33470
> Changeset: http://dev.haiku-os.org/changeset/33470/haiku
> 
> Modified:
>    haiku/trunk/headers/private/shared/cpu_type.h
> Log:
> Patch by "v" to fix ticket #4733, there are Core and Core 2 Celerons. I
> enhanced it to also say Core 2 Quad and Core 2 Duo again, instead of just
> Core 2. Thanks!
> 
> 
> Modified: haiku/trunk/headers/private/shared/cpu_type.h
> ===================================================================
> --- haiku/trunk/headers/private/shared/cpu_type.h     2009-10-06 16:19:34 UTC 
> (rev 33469)
> +++ haiku/trunk/headers/private/shared/cpu_type.h     2009-10-06 17:08:24 UTC 
> (rev 33470)

[...]

>               case B_CPU_INTEL_PENTIUM_CORE_2:
>                       get_cpuid_model_string(cpuidName);
> +                     if (strcasestr(cpuidName, "Celeron") != NULL)
> +                             return "Core 2 Celeron";
>                       if (strcasestr(cpuidName, "Xeon") != NULL)
>                               return "Core 2 Xeon";
>                       return "Core 2";
>               case B_CPU_INTEL_PENTIUM_CORE_2_45_NM:
>                       get_cpuid_model_string(cpuidName);
> -                     if (strcasestr(cpuidName, "Duo") != NULL
> -                             || strcasestr(cpuidName, "Quad") != NULL) {
> -                             return "Core 2";
> -                     }
> +                     if (strcasestr(cpuidName, "Celeron") != NULL)
> +                             return "Core 2 Celeron";
> +                     if (strcasestr(cpuidName, "Duo") != NULL)
> +                             return "Core 2 Duo";
> +                     if (strcasestr(cpuidName, "Quad") != NULL)
> +                             return "Core 2 Quad";
>                       if (strcasestr(cpuidName, "Xeon") != NULL)
>                               return "Core 2 Xeon";
>                       return "Core 2 Extreme";

Are you sure you want to go that way? if it is, it's incomplete: neglected Solo 
and didn't do it for the  B_CPU_INTEL_PENTIUM_CORE_2 and  
B_CPU_INTEL_PENTIUM_CORE cases.

- V

                                          
_________________________________________________________________
See all the ways you can stay connected to friends and family
http://www.microsoft.com/windows/windowslive/default.aspx

Other related posts: