]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix Mac OS tools.
authorVMware, Inc <>
Mon, 22 Aug 2011 19:48:33 +0000 (12:48 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Mon, 22 Aug 2011 19:48:33 +0000 (12:48 -0700)
Two fixes:

. Enable Hostinfo_TouchBackDoor for Mac OS. The comment doesn't seem to be
true, at least not anymore.

. On Mac OS, create the glib main loop with the "running" flag set. Since
we don't call g_main_loop_run() on Mac OS, that's the only way to signal
that the loop is running.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/misc/hostinfoHV.c
open-vm-tools/services/vmtoolsd/mainLoop.c

index 356eb4583cb1863bd50bc17d82d2157319ad00d8..9cbad2fd8747a73d0f577c44d11bc9aa61c6e5ca 100644 (file)
@@ -489,7 +489,7 @@ Hostinfo_VCPUInfoBackdoor(unsigned bit)
 /*
  *----------------------------------------------------------------------
  *
- *  Hostinfo_TouchBackDoor --
+ * Hostinfo_TouchBackDoor --
  *
  *      Access the backdoor. This is used to determine if we are
  *      running in a VM or on a physical host. On a physical host
@@ -505,7 +505,7 @@ Hostinfo_VCPUInfoBackdoor(unsigned bit)
  *      if not.
  *
  * Side effects:
- *     Exception if not in a VM.
+ *      Exception if not in a VM.
  *
  *----------------------------------------------------------------------
  */
@@ -513,13 +513,7 @@ Hostinfo_VCPUInfoBackdoor(unsigned bit)
 Bool
 Hostinfo_TouchBackDoor(void)
 {
-   /*
-    * XXX: This can cause Apple's Crash Reporter to erroneously display
-    * a crash, even though the process has caught the SIGILL and handled
-    * it.
-    */
-
-#if !defined(__APPLE__) && (defined(__i386__) || defined(__x86_64__))
+#if defined(__i386__) || defined(__x86_64__)
    uint32 eax;
    uint32 ebx;
    uint32 ecx;
index d88cfbe7fa262acbeaa0664905bbddd602513bc9..a5738c76769777b77304d97d5e89bee831e1e576 100644 (file)
@@ -387,7 +387,15 @@ ToolsCore_Setup(ToolsServiceState *state)
    state->ctx.version = TOOLS_CORE_API_V1;
    state->ctx.name = state->name;
    state->ctx.errorCode = EXIT_SUCCESS;
+#if defined(__APPLE__)
+   /*
+    * Mac OS doesn't use g_main_loop_run(), so need to create the loop as
+    * "running".
+    */
+   state->ctx.mainLoop = g_main_loop_new(gctx, TRUE);
+#else
    state->ctx.mainLoop = g_main_loop_new(gctx, FALSE);
+#endif
    state->ctx.isVMware = VmCheck_IsVirtualWorld();
    g_main_context_unref(gctx);