From a5072a25d91734a16ddeb366dc16be7aa4b42160 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Sat, 15 Jun 2013 03:18:23 -0700 Subject: [PATCH] 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: --- client/hostinfo_unix.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/hostinfo_unix.cpp b/client/hostinfo_unix.cpp index 25ab356451..a3477140ff 100644 --- a/client/hostinfo_unix.cpp +++ b/client/hostinfo_unix.cpp @@ -755,6 +755,12 @@ static void get_cpu_info_maxosx(HOST_INFO& host) { *out++ = *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: + // + len = sizeof(host.product_name); + sysctlbyname("hw.model", host.product_name, &len, NULL, 0); } #endif