client: fill in HOST_INFO producet_name field for Macintosh.

This returns an Apple hardware model designation such as "MacPro3,1".  One source for converting this to a common model name is:
<http://www.everymac.com/systems/by_capability/mac-specs-by-machine-model-machine-id.html>
This commit is contained in:
Charlie Fenton 2013-06-15 03:18:23 -07:00
parent 77877733f7
commit a5072a25d9
1 changed files with 6 additions and 0 deletions

View File

@ -755,6 +755,12 @@ static void get_cpu_info_maxosx(HOST_INFO& host) {
*out++ = *in; *out++ = *in;
} }
} while (*in++); } while (*in++);
// This returns an Apple hardware model designation such as "MacPro3,1".
// One source for converting this to a common model name is:
// <http://www.everymac.com/systems/by_capability/mac-specs-by-machine-model-machine-id.html>
len = sizeof(host.product_name);
sysctlbyname("hw.model", host.product_name, &len, NULL, 0);
} }
#endif #endif