client: Display Mac OS Version as well as Darwin version in Event Log

svn path=/trunk/boinc/; revision=21698
This commit is contained in:
Charlie Fenton 2010-06-07 07:18:07 +00:00
parent 3ea0b8d79d
commit 6b516fde4d
2 changed files with 15 additions and 0 deletions

View File

@ -4136,3 +4136,9 @@ David 4 Jun 2010
ops/ ops/
credit.php credit.php
team_import.php team_import.php
Charlie 7 Jun 2010
- client: Display Mac OS Version as well as Darwin version in Event Log.
client/
client_state.cpp

View File

@ -159,9 +159,18 @@ void CLIENT_STATE::show_host_info() {
msg_printf(NULL, MSG_INFO, msg_printf(NULL, MSG_INFO,
"Processor features: %s", host_info.p_features "Processor features: %s", host_info.p_features
); );
#ifdef __APPLE__
int major, minor, rev;
sscanf(host_info.os_version, "%d.%d.%d", &major, &minor, &rev);
msg_printf(NULL, MSG_INFO,
"OS: Mac OS X 10.%d.%d (%s %s)", major-4, minor,
host_info.os_name, host_info.os_version
);
#else
msg_printf(NULL, MSG_INFO, msg_printf(NULL, MSG_INFO,
"OS: %s: %s", host_info.os_name, host_info.os_version "OS: %s: %s", host_info.os_name, host_info.os_version
); );
#endif
nbytes_to_string(host_info.m_nbytes, 0, buf, sizeof(buf)); nbytes_to_string(host_info.m_nbytes, 0, buf, sizeof(buf));
nbytes_to_string(host_info.m_swap, 0, buf2, sizeof(buf2)); nbytes_to_string(host_info.m_swap, 0, buf2, sizeof(buf2));