Rename a routine to match the OS name.

It's now "macOS".

While we're at it, note that the property list from which it fetches
version information still calls it "Mac OS X".

Change-Id: I438ef9dc65c2619d7378b0deb5efc84734a2ac6d
Reviewed-on: https://code.wireshark.org/review/22159
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2017-06-16 00:57:54 -07:00
parent 2e497e105f
commit 63b91ad311
1 changed files with 5 additions and 2 deletions

View File

@ -73,9 +73,12 @@ get_string_from_dictionary(CFPropertyListRef dict, CFStringRef key)
/*
* Get the macOS version information, and append it to the GString.
* Return TRUE if we succeed, FALSE if we fail.
*
* XXX - this gives the OS name as "Mac OS X" even if Apple called/calls
* it "OS X" or "macOS".
*/
static gboolean
get_os_x_version_info(GString *str)
get_macos_version_info(GString *str)
{
static const UInt8 server_version_plist_path[] =
"/System/Library/CoreServices/ServerVersion.plist";
@ -440,7 +443,7 @@ get_os_version_info(GString *str)
* version if we can, and put the Darwin information
* in parentheses.
*/
if (get_os_x_version_info(str)) {
if (get_macos_version_info(str)) {
/* Success - append the Darwin information. */
g_string_append_printf(str, " (%s %s)", name.sysname, name.release);
} else {