Changeset 64097 in vbox for trunk/src/VBox/Main
- Timestamp:
- Sep 29, 2016 3:56:30 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r64096 r64097 3818 3818 hrc = pMedium->COMGETTER(LogicalSize)(&i64Size); H(); 3819 3819 #ifdef RT_OS_WINDOWS 3820 RT_NOREF(pfUseHostIOCache); 3821 3820 3822 if ( enmFsTypeFile == RTFSTYPE_FAT 3821 3823 && i64Size >= _4G) … … 4096 4098 fHotplug ? 0 : PDM_TACH_FLAGS_NOT_HOT_PLUG); 4097 4099 else 4098 rc = PDMR3DeviceDetach(pUVM, pcszDevice, uInstance, uLUN, fHotplug ? 0 : PDM_TACH_FLAGS_NOT_HOT_PLUG); 4100 { 4101 /* 4102 * Don't detach the SCSI driver when unmounting the current medium 4103 * (we are not ripping out the device but only eject the medium). 4104 */ 4105 char *pszDriverDetach = NULL; 4106 if ( !fHotplug 4107 && (enmBus == StorageBus_SATA || enmBus == StorageBus_SAS || enmBus == StorageBus_SCSI)) 4108 { 4109 /* Get the current attached driver we have to detach. */ 4110 PCFGMNODE pDrvLun = CFGMR3GetChildF(pCtlInst, "LUN#%u/AttachedDriver/", uLUN); 4111 if (pDrvLun) 4112 { 4113 char szDriver[128]; 4114 RT_ZERO(szDriver); 4115 rc = CFGMR3QueryString(pDrvLun, "Driver", &szDriver[0], sizeof(szDriver)); 4116 if (RT_SUCCESS(rc)) 4117 pszDriverDetach = RTStrDup(&szDriver[0]); 4118 } 4119 } 4120 4121 rc = PDMR3DriverDetach(pUVM, pcszDevice, uInstance, uLUN, 4122 pszDriverDetach, 0 /* iOccurence */, 4123 fHotplug ? 0 : PDM_TACH_FLAGS_NOT_HOT_PLUG); 4124 if (pszDriverDetach) 4125 RTStrFree(pszDriverDetach); 4126 } 4099 4127 if (rc == VERR_PDM_NO_DRIVER_ATTACHED_TO_LUN) 4100 4128 rc = VINF_SUCCESS; … … 4114 4142 mapMediumAttachments[devicePath] = pMediumAtt; 4115 4143 4116 /* SCSI has a another driver between device and block. */ 4117 if (enmBus == StorageBus_SCSI || enmBus == StorageBus_SAS || enmBus == StorageBus_USB) 4144 /* 4145 * Insert the SCSI driver for hotplug events the SCSI/USB based sotrage controllers 4146 * or for SATA if the new device is a CD/DVD drive. 4147 */ 4148 if ( fHotplug 4149 && ( (enmBus == StorageBus_SCSI || enmBus == StorageBus_SAS || enmBus == StorageBus_USB) 4150 || (enmBus == StorageBus_SATA && lType == DeviceType_DVD))) 4118 4151 { 4119 4152 InsertConfigString(pLunL0, "Driver", "SCSI");
Note:
See TracChangeset
for help on using the changeset viewer.