<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -113,12 +113,32 @@
 + (NSString*) cputype
 {
     int error = 0;
-
-
+    
+    int cputype = -1;
+    size_t length = sizeof(cputype);
+    error = sysctlbyname(&quot;hw.cputype&quot;, &amp;cputype, &amp;length, NULL, 0);
+    
+    if (error != 0) {
+        NSLog(@&quot;Failed to obtain CPU type&quot;);
+        return nil;
+    }
+    
+    // Intel
+    if (cputype == CPU_TYPE_X86) {
+        char stringValue[255];
+        size_t stringLength = sizeof(stringValue);
+        error = sysctlbyname(&quot;machdep.cpu.brand_string&quot;, &amp;stringValue, &amp;stringLength, NULL, 0);
+        if ((error == 0) &amp;&amp; (stringValue != NULL)) {
+            NSString *brandString = [NSString stringWithUTF8String:stringValue];
+            if (brandString)
+                return brandString;
+        }
+    }
+    
     int cpufamily = -1;
-    size_t length = sizeof(cpufamily);
+    length = sizeof(cpufamily);
     error = sysctlbyname(&quot;hw.cpufamily&quot;, &amp;cpufamily, &amp;length, NULL, 0);
-    
+        
     if (error == 0) {
         // 10.5+
         switch (cpufamily) {
@@ -135,21 +155,14 @@
             case CPUFAMILY_INTEL_PENRYN:
                 return @&quot;Intel Core 2 Duo (Penryn)&quot;;
             case CPUFAMILY_INTEL_NEHALEM:
-                return @&quot;Intel Xeon (Nehalem)&quot;;
+            	return @&quot;Intel Xeon (Nehalem)&quot;;
         }
         return nil;
     }
 
 
-    int cputype = -1;
-    error = sysctlbyname(&quot;hw.cputype&quot;, &amp;cputype, &amp;length, NULL, 0);
-
-    if (error != 0) {
-        NSLog(@&quot;Failed to obtain CPU type&quot;);
-        return nil;
-    }
-
     int cpusubtype = -1;
+    length = sizeof(cpusubtype);
     error = sysctlbyname(&quot;hw.cpusubtype&quot;, &amp;cpusubtype, &amp;length, NULL, 0);
 
     if (error != 0) {
@@ -158,16 +171,16 @@
     }
 
     switch (cputype) {
-        case 7:
+        case CPU_TYPE_X86:
             return @&quot;Intel&quot;;
-        case 18:
+        case CPU_TYPE_POWERPC:
             switch (cpusubtype) {
-                case 9:
+                case CPU_SUBTYPE_POWERPC_750:
                     return @&quot;PowerPC G3&quot;;
-                case 10:
-                case 11:
+                case CPU_SUBTYPE_POWERPC_7400:
+                case CPU_SUBTYPE_POWERPC_7450:
                     return @&quot;PowerPC G4&quot;;
-                case 100:
+                case CPU_SUBTYPE_POWERPC_970:
                     return @&quot;PowerPC G5&quot;;
             }
             break;</diff>
      <filename>Sources/Main/FRSystemProfile.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ce011c70220ddefc7a9a1e227e11157cc85e8ae6</id>
    </parent>
  </parents>
  <author>
    <name>BrotherBard</name>
    <email>nkinsinger@brotherbard.com</email>
  </author>
  <url>http://github.com/tcurdt/feedbackreporter/commit/54748c5d4b7c8bb697b0aa9f6762bb80e92cd9a9</url>
  <id>54748c5d4b7c8bb697b0aa9f6762bb80e92cd9a9</id>
  <committed-date>2009-11-06T02:15:14-08:00</committed-date>
  <authored-date>2009-11-04T17:54:56-08:00</authored-date>
  <message>1) Better CPU subtype string for Intel machines.
   Xeon CPUs showed up as Core 2 Duos because they have the same hw.cputype.
   Use machdep.cpu.brand_string instead. This also has the advantage of always being up to date when Apple releases new hardware.
2) Replaced numbers with defined constants.</message>
  <tree>ac25544c9303d5567752e23a1e171452ced1c636</tree>
  <committer>
    <name>Torsten Curdt</name>
    <email>tcurdt@vafer.org</email>
  </committer>
</commit>
