Changeset 94964 in vbox
- Timestamp:
- May 9, 2022 2:57:40 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151372
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/VMMDevInterface.cpp
r93444 r94964 86 86 , mParent(console) 87 87 { 88 int rc = RTSemEventCreate(&mCredentialsEvent);89 AssertRC( rc);90 #ifdef VBOX_WITH_HGCM 91 rc = HGCMHostInit();92 AssertRC( rc);88 int vrc = RTSemEventCreate(&mCredentialsEvent); 89 AssertRC(vrc); 90 #ifdef VBOX_WITH_HGCM 91 vrc = HGCMHostInit(); 92 AssertRC(vrc); 93 93 m_fHGCMActive = true; 94 94 #endif /* VBOX_WITH_HGCM */ … … 131 131 } 132 132 133 int rc = RTSemEventWait(mCredentialsEvent, u32Timeout);134 135 if (RT_SUCCESS( rc))133 int vrc = RTSemEventWait(mCredentialsEvent, u32Timeout); 134 135 if (RT_SUCCESS(vrc)) 136 136 { 137 137 *pu32CredentialsFlags = mu32CredentialsFlags; 138 138 } 139 139 140 return rc;140 return vrc; 141 141 } 142 142 … … 145 145 mu32CredentialsFlags = u32Flags; 146 146 147 int rc = RTSemEventSignal(mCredentialsEvent);148 AssertRC( rc);149 150 return rc;147 int vrc = RTSemEventSignal(mCredentialsEvent); 148 AssertRC(vrc); 149 150 return vrc; 151 151 } 152 152 … … 941 941 VBOXHGCMSVCPARM parm; 942 942 HGCMSvcSetU32(&parm, fFlags); 943 int rc = hgcmHostCall("VBoxGuestPropSvc", GUEST_PROP_FN_HOST_SET_GLOBAL_FLAGS, 1, &parm);944 if (RT_FAILURE( rc))943 int vrc = hgcmHostCall("VBoxGuestPropSvc", GUEST_PROP_FN_HOST_SET_GLOBAL_FLAGS, 1, &parm); 944 if (RT_FAILURE(vrc)) 945 945 { 946 946 char szFlags[GUEST_PROP_MAX_FLAGS_LEN]; … … 950 950 Log(("Failed to set the global flags \"%s\".\n", szFlags)); 951 951 } 952 return rc;952 return vrc; 953 953 } 954 954 … … 967 967 * Load the service 968 968 */ 969 int rc = hgcmLoadService("VBoxGuestPropSvc", "VBoxGuestPropSvc");970 if (RT_FAILURE( rc))971 { 972 LogRel(("VBoxGuestPropSvc is not available. rc = %Rrc\n",rc));969 int vrc = hgcmLoadService("VBoxGuestPropSvc", "VBoxGuestPropSvc"); 970 if (RT_FAILURE(vrc)) 971 { 972 LogRel(("VBoxGuestPropSvc is not available. vrc = %Rrc\n", vrc)); 973 973 return VINF_SUCCESS; /* That is not a fatal failure. */ 974 974 } … … 999 999 if (papszNames && papszValues && pai64Timestamps && papszFlags) 1000 1000 { 1001 for (unsigned i = 0; RT_SUCCESS( rc) && i < cProps; ++i)1001 for (unsigned i = 0; RT_SUCCESS(vrc) && i < cProps; ++i) 1002 1002 { 1003 AssertPtrBreakStmt(namesOut[i], rc = VERR_INVALID_PARAMETER);1004 rc = RTUtf16ToUtf8(namesOut[i], &papszNames[i]);1005 if (RT_FAILURE( rc))1003 AssertPtrBreakStmt(namesOut[i], vrc = VERR_INVALID_PARAMETER); 1004 vrc = RTUtf16ToUtf8(namesOut[i], &papszNames[i]); 1005 if (RT_FAILURE(vrc)) 1006 1006 break; 1007 1007 if (valuesOut[i]) 1008 rc = RTUtf16ToUtf8(valuesOut[i], &papszValues[i]);1008 vrc = RTUtf16ToUtf8(valuesOut[i], &papszValues[i]); 1009 1009 else 1010 1010 papszValues[i] = szEmpty; 1011 if (RT_FAILURE( rc))1011 if (RT_FAILURE(vrc)) 1012 1012 break; 1013 1013 pai64Timestamps[i] = timestampsOut[i]; 1014 1014 if (flagsOut[i]) 1015 rc = RTUtf16ToUtf8(flagsOut[i], &papszFlags[i]);1015 vrc = RTUtf16ToUtf8(flagsOut[i], &papszFlags[i]); 1016 1016 else 1017 1017 papszFlags[i] = szEmpty; 1018 1018 } 1019 if (RT_SUCCESS( rc))1019 if (RT_SUCCESS(vrc)) 1020 1020 i_guestPropSetMultiple((void *)papszNames, (void *)papszValues, (void *)pai64Timestamps, (void *)papszFlags); 1021 1021 for (unsigned i = 0; i < cProps; ++i) … … 1029 1029 } 1030 1030 else 1031 rc = VERR_NO_MEMORY;1031 vrc = VERR_NO_MEMORY; 1032 1032 RTMemTmpFree(papszNames); 1033 1033 RTMemTmpFree(papszValues); 1034 1034 RTMemTmpFree(pai64Timestamps); 1035 1035 RTMemTmpFree(papszFlags); 1036 AssertRCReturn( rc,rc);1036 AssertRCReturn(vrc, vrc); 1037 1037 1038 1038 /* … … 1042 1042 1043 1043 # ifdef VBOX_WITH_GUEST_PROPS_RDONLY_GUEST 1044 rc = i_guestPropSetGlobalPropertyFlags(GUEST_PROP_F_RDONLYGUEST);1045 AssertRCReturn( rc,rc);1044 vrc = i_guestPropSetGlobalPropertyFlags(GUEST_PROP_F_RDONLYGUEST); 1045 AssertRCReturn(vrc, vrc); 1046 1046 # endif 1047 1047 … … 1125 1125 pThis->pVMMDev->mpDrv = pThis; 1126 1126 1127 int rc = VINF_SUCCESS;1127 int vrc = VINF_SUCCESS; 1128 1128 #ifdef VBOX_WITH_HGCM 1129 1129 /* 1130 1130 * Load & configure the shared folders service. 1131 1131 */ 1132 rc = pThis->pVMMDev->hgcmLoadService(VBOXSHAREDFOLDERS_DLL, "VBoxSharedFolders");1133 pThis->pVMMDev->fSharedFolderActive = RT_SUCCESS( rc);1134 if (RT_SUCCESS( rc))1132 vrc = pThis->pVMMDev->hgcmLoadService(VBOXSHAREDFOLDERS_DLL, "VBoxSharedFolders"); 1133 pThis->pVMMDev->fSharedFolderActive = RT_SUCCESS(vrc); 1134 if (RT_SUCCESS(vrc)) 1135 1135 { 1136 1136 PPDMLED pLed; … … 1140 1140 pLedPort = PDMIBASE_QUERY_INTERFACE(pDrvIns->pUpBase, PDMILEDPORTS); 1141 1141 AssertMsgReturn(pLedPort, ("Configuration error: No LED port interface above!\n"), VERR_PDM_MISSING_INTERFACE_ABOVE); 1142 rc = pLedPort->pfnQueryStatusLed(pLedPort, 0, &pLed);1143 if (RT_SUCCESS( rc) && pLed)1142 vrc = pLedPort->pfnQueryStatusLed(pLedPort, 0, &pLed); 1143 if (RT_SUCCESS(vrc) && pLed) 1144 1144 { 1145 1145 VBOXHGCMSVCPARM parm; … … 1149 1149 parm.u.pointer.size = sizeof(*pLed); 1150 1150 1151 rc = HGCMHostCall("VBoxSharedFolders", SHFL_FN_SET_STATUS_LED, 1, &parm);1151 vrc = HGCMHostCall("VBoxSharedFolders", SHFL_FN_SET_STATUS_LED, 1, &parm); 1152 1152 } 1153 1153 else 1154 AssertMsgFailed(("pfnQueryStatusLed failed with %Rrc (pLed=%x)\n", rc, pLed));1154 AssertMsgFailed(("pfnQueryStatusLed failed with %Rrc (pLed=%x)\n", vrc, pLed)); 1155 1155 } 1156 1156 else 1157 LogRel(("Failed to load Shared Folders service %Rrc\n", rc));1157 LogRel(("Failed to load Shared Folders service %Rrc\n", vrc)); 1158 1158 1159 1159 … … 1162 1162 */ 1163 1163 # ifdef VBOX_WITH_GUEST_CONTROL 1164 rc = pThis->pVMMDev->hgcmLoadService("VBoxGuestControlSvc", "VBoxGuestControlSvc");1165 if (RT_SUCCESS( rc))1166 { 1167 rc = HGCMHostRegisterServiceExtension(&pThis->hHgcmSvcExtGstCtrl, "VBoxGuestControlSvc",1168 &Guest::i_notifyCtrlDispatcher,1169 pThis->pVMMDev->mParent->i_getGuest());1170 if (RT_SUCCESS( rc))1164 vrc = pThis->pVMMDev->hgcmLoadService("VBoxGuestControlSvc", "VBoxGuestControlSvc"); 1165 if (RT_SUCCESS(vrc)) 1166 { 1167 vrc = HGCMHostRegisterServiceExtension(&pThis->hHgcmSvcExtGstCtrl, "VBoxGuestControlSvc", 1168 &Guest::i_notifyCtrlDispatcher, 1169 pThis->pVMMDev->mParent->i_getGuest()); 1170 if (RT_SUCCESS(vrc)) 1171 1171 LogRel(("Guest Control service loaded\n")); 1172 1172 else 1173 LogRel(("Warning: Cannot register VBoxGuestControlSvc extension! rc=%Rrc\n",rc));1173 LogRel(("Warning: Cannot register VBoxGuestControlSvc extension! vrc=%Rrc\n", vrc)); 1174 1174 } 1175 1175 else 1176 LogRel(("Warning!: Failed to load the Guest Control Service! %Rrc\n", rc));1176 LogRel(("Warning!: Failed to load the Guest Control Service! %Rrc\n", vrc)); 1177 1177 # endif /* VBOX_WITH_GUEST_CONTROL */ 1178 1178 … … 1182 1182 */ 1183 1183 # ifdef VBOX_WITH_GUEST_PROPS 1184 rc = pThis->pVMMDev->i_guestPropLoadAndConfigure();1185 AssertLogRelRCReturn( rc,rc);1184 vrc = pThis->pVMMDev->i_guestPropLoadAndConfigure(); 1185 AssertLogRelRCReturn(vrc, vrc); 1186 1186 # endif 1187 1187 … … 1190 1190 * The HGCM saved state. 1191 1191 */ 1192 rc = PDMDrvHlpSSMRegisterEx(pDrvIns, HGCM_SAVED_STATE_VERSION, 4096 /* bad guess */,1193 NULL, NULL, NULL,1194 NULL, VMMDev::hgcmSave, NULL,1195 NULL, VMMDev::hgcmLoad, NULL);1196 if (RT_FAILURE( rc))1197 return rc;1192 vrc = PDMDrvHlpSSMRegisterEx(pDrvIns, HGCM_SAVED_STATE_VERSION, 4096 /* bad guess */, 1193 NULL, NULL, NULL, 1194 NULL, VMMDev::hgcmSave, NULL, 1195 NULL, VMMDev::hgcmLoad, NULL); 1196 if (RT_FAILURE(vrc)) 1197 return vrc; 1198 1198 1199 1199 #endif /* VBOX_WITH_HGCM */
Note:
See TracChangeset
for help on using the changeset viewer.