Changeset 29224 in vbox for trunk/src/VBox/Main/ConsoleImpl.cpp
- Timestamp:
- May 7, 2010 3:49:10 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r28977 r29224 3280 3280 * @thread EMT 3281 3281 */ 3282 DECLCALLBACK(int) Console::changeRemovableMedium(Console *p This,3282 DECLCALLBACK(int) Console::changeRemovableMedium(Console *pConsole, 3283 3283 const char *pcszDevice, 3284 3284 unsigned uInstance, … … 3288 3288 bool fForce) 3289 3289 { 3290 LogFlowFunc(("p This=%p uInstance=%u pszDevice=%p:{%s} enmBus=%u, aMediumAtt=%p, fForce=%d\n",3291 p This, uInstance, pcszDevice, enmBus, fForce));3292 3293 AssertReturn(p This, VERR_INVALID_PARAMETER);3294 3295 AutoCaller autoCaller(p This);3290 LogFlowFunc(("pConsole=%p uInstance=%u pszDevice=%p:{%s} enmBus=%u, aMediumAtt=%p, fForce=%d\n", 3291 pConsole, uInstance, pcszDevice, enmBus, fForce)); 3292 3293 AssertReturn(pConsole, VERR_INVALID_PARAMETER); 3294 3295 AutoCaller autoCaller(pConsole); 3296 3296 AssertComRCReturn(autoCaller.rc(), VERR_ACCESS_DENIED); 3297 3297 3298 PVM pVM = p This->mpVM;3298 PVM pVM = pConsole->mpVM; 3299 3299 3300 3300 /* … … 3313 3313 LogFlowFunc(("Suspending the VM...\n")); 3314 3314 /* disable the callback to prevent Console-level state change */ 3315 p This->mVMStateChangeCallbackDisabled = true;3315 pConsole->mVMStateChangeCallbackDisabled = true; 3316 3316 int rc = VMR3Suspend(pVM); 3317 p This->mVMStateChangeCallbackDisabled = false;3317 pConsole->mVMStateChangeCallbackDisabled = false; 3318 3318 AssertRCReturn(rc, rc); 3319 3319 fResume = true; … … 3343 3343 int rcRet = VINF_SUCCESS; 3344 3344 3345 rcRet = Console::configMediumAttachment(pCtlInst, pcszDevice, uInstance, 3346 enmBus, enmIoBackend, 3347 false /* fSetupMerge */, 3348 0 /* uMergeSource */, 3349 0 /* uMergeTarget */, 3350 aMediumAtt, pThis->mMachineState, 3351 NULL /* phrc */, 3352 true /* fAttachDetach */, 3353 fForce /* fForceUnmount */, 3354 pVM, NULL /* paLedDevType */); 3345 rcRet = pConsole->configMediumAttachment(pCtlInst, 3346 pcszDevice, 3347 uInstance, 3348 enmBus, 3349 enmIoBackend, 3350 false /* fSetupMerge */, 3351 0 /* uMergeSource */, 3352 0 /* uMergeTarget */, 3353 aMediumAtt, 3354 pConsole->mMachineState, 3355 NULL /* phrc */, 3356 true /* fAttachDetach */, 3357 fForce /* fForceUnmount */, 3358 pVM, 3359 NULL /* paLedDevType */); 3355 3360 /** @todo this dumps everything attached to this device instance, which 3356 3361 * is more than necessary. Dumping the changed LUN would be enough. */ … … 3364 3369 LogFlowFunc(("Resuming the VM...\n")); 3365 3370 /* disable the callback to prevent Console-level state change */ 3366 p This->mVMStateChangeCallbackDisabled = true;3371 pConsole->mVMStateChangeCallbackDisabled = true; 3367 3372 rc = VMR3Resume(pVM); 3368 p This->mVMStateChangeCallbackDisabled = false;3373 pConsole->mVMStateChangeCallbackDisabled = false; 3369 3374 AssertRC(rc); 3370 3375 if (RT_FAILURE(rc)) 3371 3376 { 3372 3377 /* too bad, we failed. try to sync the console state with the VMM state */ 3373 vmstateChangeCallback(pVM, VMSTATE_SUSPENDED, enmVMState, p This);3378 vmstateChangeCallback(pVM, VMSTATE_SUSPENDED, enmVMState, pConsole); 3374 3379 } 3375 3380 /// @todo (r=dmik) if we failed with drive mount, then the VMR3Resume … … 7548 7553 */ 7549 7554 /* static */ 7550 DECLCALLBACK(int) Console::reconfigureMediumAttachment(PVM pVM, 7555 DECLCALLBACK(int) Console::reconfigureMediumAttachment(Console *pConsole, 7556 PVM pVM, 7551 7557 const char *pcszDevice, 7552 7558 unsigned uInstance, … … 7582 7588 7583 7589 /* Update the device instance configuration. */ 7584 rc = Console::configMediumAttachment(pCtlInst, pcszDevice, uInstance, 7585 enmBus, enmIoBackend, 7586 fSetupMerge, uMergeSource, 7587 uMergeTarget, aMediumAtt, 7588 aMachineState, phrc, 7590 rc = pConsole->configMediumAttachment(pCtlInst, 7591 pcszDevice, 7592 uInstance, 7593 enmBus, 7594 enmIoBackend, 7595 fSetupMerge, 7596 uMergeSource, 7597 uMergeTarget, 7598 aMediumAtt, 7599 aMachineState, 7600 phrc, 7589 7601 true /* fAttachDetach */, 7590 false /* fForceUnmount */, pVM, 7602 false /* fForceUnmount */, 7603 pVM, 7591 7604 NULL /* paLedDevType */); 7592 7605 /** @todo this dumps everything attached to this device instance, which
Note:
See TracChangeset
for help on using the changeset viewer.