Changeset 34950 in vbox
- Timestamp:
- Dec 10, 2010 1:40:43 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r34728 r34950 450 450 if (!strCntName.isNull()) 451 451 { 452 bool fIsMounted = false; 453 454 VBoxMedium vmedium = vboxGlobal().findMedium(strUuid); 455 CMedium medium = vmedium.medium(); // @todo r=dj can this be cached somewhere? 456 457 /* Mount medium to the predefined port/device */ 458 machine.MountMedium(strCntName, iCntPort, iCntDevice, medium, false /* force */); 459 if (machine.isOk()) 460 fIsMounted = true; 461 else 452 /* Create a new VBoxMedium: */ 453 VBoxMedium vboxMedium(image, VBoxDefs::MediumType_DVD, KMediumState_Created); 454 /* Register it in GUI internal list: */ 455 vboxGlobal().addMedium(vboxMedium); 456 457 /* Mount medium to the predefined port/device: */ 458 machine.MountMedium(strCntName, iCntPort, iCntDevice, vboxMedium.medium(), false /* force */); 459 if (!machine.isOk()) 462 460 { 463 /* Ask for force mounting */ 464 if (vboxProblem().cannotRemountMedium(0, machine, VBoxMedium(image, VBoxDefs::MediumType_DVD), 465 true /* mount? */, true /* retry? */) == QIMessageBox::Ok) 461 /* Ask for force mounting: */ 462 if (vboxProblem().cannotRemountMedium(0, machine, vboxMedium, true /* mount? */, true /* retry? */) == QIMessageBox::Ok) 466 463 { 467 /* Force mount medium to the predefined port/device */ 468 machine.MountMedium(strCntName, iCntPort, iCntDevice, medium, true /* force */); 469 if (machine.isOk()) 470 fIsMounted = true; 471 else 472 vboxProblem().cannotRemountMedium(0, machine, VBoxMedium(image, VBoxDefs::MediumType_DVD), 473 true /* mount? */, false /* retry? */); 464 /* Force mount medium to the predefined port/device: */ 465 machine.MountMedium(strCntName, iCntPort, iCntDevice, vboxMedium.medium(), true /* force */); 466 if (!machine.isOk()) 467 vboxProblem().cannotRemountMedium(0, machine, vboxMedium, true /* mount? */, false /* retry? */); 474 468 } 475 469 }
Note:
See TracChangeset
for help on using the changeset viewer.