Changeset 25771 in vbox for trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp
- Timestamp:
- Jan 12, 2010 4:20:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp
r24018 r25771 125 125 *******************************************************************************/ 126 126 127 PVM pVM= NULL;127 PVM gpVM = NULL; 128 128 Mouse *gMouse = NULL; 129 129 VMDisplay *gDisplay = NULL; … … 956 956 LogFlow(("Returning from main()!\n")); 957 957 958 if ( pVM)958 if (gpVM) 959 959 { 960 960 /* … … 966 966 { 967 967 /* Power off VM */ 968 rc = VMR3PowerOff( pVM);968 rc = VMR3PowerOff(gpVM); 969 969 AssertRC(rc); 970 970 } 971 971 972 972 /* And destroy it */ 973 rc = VMR3Destroy( pVM);973 rc = VMR3Destroy(gpVM); 974 974 AssertRC(rc); 975 975 } … … 1140 1140 { 1141 1141 static const char * const s_apszGroups[] = VBOX_LOGGROUP_NAMES; 1142 static char s zError[RTPATH_MAX + 128] = "";1142 static char s_szError[RTPATH_MAX + 128] = ""; 1143 1143 PRTLOGGER pLogger; 1144 1144 rc2 = RTLogCreateEx(&pLogger, RTLOGFLAGS_PREFIX_TIME_PROG, "all", 1145 1145 "VBOX_RELEASE_LOG", RT_ELEMENTS(s_apszGroups), s_apszGroups, 1146 RTLOGDEST_FILE, s zError, sizeof(szError), "./VBoxBFE.log");1146 RTLOGDEST_FILE, s_szError, sizeof(s_szError), "./VBoxBFE.log"); 1147 1147 if (RT_SUCCESS(rc2)) 1148 1148 { … … 1161 1161 } 1162 1162 else 1163 RTPrintf("Could not open release log (%s)\n", s zError);1163 RTPrintf("Could not open release log (%s)\n", s_szError); 1164 1164 } 1165 1165 … … 1172 1172 * Create empty VM. 1173 1173 */ 1174 rc = VMR3Create(1, setVMErrorCallback, NULL, vboxbfeConfigConstructor, NULL, & pVM);1174 rc = VMR3Create(1, setVMErrorCallback, NULL, vboxbfeConfigConstructor, NULL, &gpVM); 1175 1175 if (RT_FAILURE(rc)) 1176 1176 { … … 1183 1183 * Register VM state change handler 1184 1184 */ 1185 rc = VMR3AtStateRegister( pVM, vmstateChangeCallback, NULL);1185 rc = VMR3AtStateRegister(gpVM, vmstateChangeCallback, NULL); 1186 1186 if (RT_FAILURE(rc)) 1187 1187 { … … 1202 1202 int cbString; 1203 1203 PRTUTF16 aHostPath, aMapName; 1204 int rc; 1205 1206 rc = RTStrToUtf16(g_pszShareDir[i], &aHostPath); 1207 AssertRC(rc); 1208 rc = RTStrToUtf16(g_pszShareName[i], &aMapName); 1209 AssertRC(rc); 1204 1205 rc2 = RTStrToUtf16(g_pszShareDir[i], &aHostPath); 1206 AssertRC(rc2); 1207 rc2 = RTStrToUtf16(g_pszShareName[i], &aMapName); 1208 AssertRC(rc2); 1210 1209 1211 1210 cbString = (RTUtf16Len (aHostPath) + 1) * sizeof (RTUTF16); … … 1236 1235 parms[2].u.uint32 = !g_fShareReadOnly[i]; 1237 1236 1238 rc = gVMMDev->hgcmHostCall ("VBoxSharedFolders",1239 SHFL_FN_ADD_MAPPING, SHFL_CPARMS_ADD_MAPPING, &parms[0]);1240 AssertRC(rc );1237 rc2 = gVMMDev->hgcmHostCall ("VBoxSharedFolders", 1238 SHFL_FN_ADD_MAPPING, SHFL_CPARMS_ADD_MAPPING, &parms[0]); 1239 AssertRC(rc2); 1241 1240 LogRel(("Added share %s: (%s)\n", g_pszShareName[i], g_pszShareDir[i])); 1242 1241 RTMemFree (pFolderName); … … 1255 1254 { 1256 1255 gHostUSB = new HostUSB(); 1257 gHostUSB->init( pVM);1256 gHostUSB->init(gpVM); 1258 1257 } 1259 1258 #endif /* VBOXBFE_WITH_USB */ … … 1277 1276 { 1278 1277 startProgressInfo("Restoring"); 1279 rc = VMR3LoadFromFile( pVM, g_pszStateFile, callProgressInfo, (uintptr_t)NULL);1278 rc = VMR3LoadFromFile(gpVM, g_pszStateFile, callProgressInfo, (uintptr_t)NULL); 1280 1279 endProgressInfo(); 1281 1280 if (RT_SUCCESS(rc)) 1282 1281 { 1283 rc = VMR3Resume( pVM);1282 rc = VMR3Resume(gpVM); 1284 1283 AssertRC(rc); 1285 1284 gDisplay->setRunning(); … … 1290 1289 else 1291 1290 { 1292 rc = VMR3PowerOn( pVM);1291 rc = VMR3PowerOn(gpVM); 1293 1292 if (RT_FAILURE(rc)) 1294 1293 AssertMsgFailed(("VMR3PowerOn failed, rc=%Rrc\n", rc)); … … 1305 1304 1306 1305 failure: 1307 if ( pVM)1308 { 1309 rc2 = VMR3Destroy( pVM);1306 if (gpVM) 1307 { 1308 rc2 = VMR3Destroy(gpVM); 1310 1309 AssertRC(rc2); 1311 pVM = NULL;1310 gpVM = NULL; 1312 1311 } 1313 1312 machineState = VMSTATE_TERMINATED;
Note:
See TracChangeset
for help on using the changeset viewer.