- Timestamp:
- May 11, 2010 8:12:08 AM (15 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp
r29313 r29316 308 308 { 309 309 /* 310 * HACK ALERT! If a service uses some sort of HGCM host service 311 * which is not available on the host (maybe because the host is 312 * using an older VBox version), just disable that service here. 310 * HACK ALERT! If a service uses some sort of functionality (like a 311 * certain HGCM host service which is not available on the host or 312 * some special OS feature which is not available on the current guest), 313 * just disable that service here in case the service told us so. 314 * 315 * This prevents terminating the whole VBoxService if a (or some) sub service(s) is/are 316 * not available. 313 317 */ 318 314 319 /** @todo r=bird: This a generic thing that isn't necessarily restricted to 315 320 * HGCM. Also, the service knows best whether a host service is required … … 317 322 * non-fatal init failure, or simply quietly pretend to work. (Low 318 323 * prio.) */ 319 if (rc == VERR_HGCM_SERVICE_NOT_FOUND) 320 VBoxServiceVerbose(0, "Service '%s' failed to find a HGCM service and was disabled\n", 324 if ( rc == VERR_NOT_SUPPORTED 325 || rc == VERR_NOT_IMPLEMENTED) 326 { 327 VBoxServiceVerbose(0, "Service '%s' disabled because a certain functionality is not implemented or supported, rc=%Rrc\n", 321 328 g_aServices[j].pDesc->pszName, rc); 329 g_aServices[j].fEnabled = false; 330 } 322 331 else 323 332 { … … 326 335 return rc; 327 336 } 328 g_aServices[j].fEnabled = false;329 337 } 330 338 } -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
r29202 r29316 89 89 else 90 90 { 91 if (rc == VERR_HGCM_SERVICE_NOT_FOUND) /* Host service is not available ; that's not fatal. */92 VBoxServiceVerbose(0, " Guest control service is not available\n");91 if (rc == VERR_HGCM_SERVICE_NOT_FOUND) /* Host service is not available. */ 92 VBoxServiceVerbose(0, "Control: Guest control service is not available\n"); 93 93 else 94 94 VBoxServiceError("Control: Failed to connect to the guest control service! Error: %Rrc\n", rc); 95 95 RTSemEventMultiDestroy(g_hControlEvent); 96 96 g_hControlEvent = NIL_RTSEMEVENTMULTI; 97 98 /* 99 * Not having the guest control service on the host renders this whole service 100 * unusable, so report that we are not able to continue. 101 */ 102 rc = VERR_NOT_SUPPORTED; 97 103 } 98 104 return rc; -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceStats.cpp
r28800 r29316 118 118 rc = VbglR3StatQueryInterval(&gCtx.cMsStatInterval); 119 119 if (RT_SUCCESS(rc)) 120 VBoxServiceVerbose(3, "VBoxStatsInit: new statistics interval %u seconds\n", gCtx.cMsStatInterval);120 VBoxServiceVerbose(3, "VBoxStatsInit: New statistics interval %u seconds\n", gCtx.cMsStatInterval); 121 121 else 122 122 VBoxServiceVerbose(3, "VBoxStatsInit: DeviceIoControl failed with %d\n", rc); 123 123 124 124 #ifdef RT_OS_WINDOWS 125 /** @todo Use RTLdr instead of LoadLibrary/GetProcAddress here! */ 126 125 127 /* NtQuerySystemInformation might be dropped in future releases, so load it dynamically as per Microsoft's recommendation */ 126 128 HMODULE hMod = LoadLibrary("NTDLL.DLL"); … … 132 134 else 133 135 { 134 VBoxService Error("VBoxStatsInit: NTDLL.NtQuerySystemInformation not found!!\n");136 VBoxServiceVerbose(3, "VBoxStatsInit: NTDLL.NtQuerySystemInformation not found!\n"); 135 137 return VERR_NOT_IMPLEMENTED; 136 138 } … … 146 148 else 147 149 { 148 /** @todo now fails in NT4; do we care? */149 VBoxService Error("VBoxStatsInit: KERNEL32.GlobalMemoryStatusEx not found!!\n");150 /** @todo Now fails in NT4; do we care? */ 151 VBoxServiceVerbose(3, "VBoxStatsInit: KERNEL32.GlobalMemoryStatusEx not found!\n"); 150 152 return VERR_NOT_IMPLEMENTED; 151 153 } -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
r29040 r29316 108 108 109 109 #ifdef RT_OS_WINDOWS 110 /** @todo Use RTLdr instead of LoadLibrary/GetProcAddress here! */ 111 110 112 /* Get function pointers. */ 111 113 HMODULE hKernel32 = LoadLibrary("kernel32"); … … 119 121 rc = VbglR3GuestPropConnect(&g_uVMInfoGuestPropSvcClientID); 120 122 if (RT_SUCCESS(rc)) 121 VBoxServiceVerbose(3, " Property Service Client ID: %#x\n", g_uVMInfoGuestPropSvcClientID);123 VBoxServiceVerbose(3, "VMInfo: Property Service Client ID: %#x\n", g_uVMInfoGuestPropSvcClientID); 122 124 else 123 125 { 124 VBoxServiceError("Failed to connect to the guest property service! Error: %Rrc\n", rc); 126 if (rc == VERR_HGCM_SERVICE_NOT_FOUND) /* Host service is not available. */ 127 VBoxServiceVerbose(0, "VMInfo: Guest property service is not available\n"); 128 else 129 VBoxServiceError("VMInfo: Failed to connect to the guest property service! Error: %Rrc\n", rc); 125 130 RTSemEventMultiDestroy(g_hVMInfoEvent); 126 131 g_hVMInfoEvent = NIL_RTSEMEVENTMULTI; 132 133 /* 134 * Not having the guest property service on the host renders this whole service 135 * unusable, so report that we are not able to continue. 136 */ 137 rc = VERR_NOT_SUPPORTED; 127 138 } 128 139
Note:
See TracChangeset
for help on using the changeset viewer.