- Timestamp:
- Oct 21, 2009 1:08:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
r23928 r23932 173 173 } 174 174 175 if (fRunTime) 176 { 177 if ( !RTStrICmp(pszMedium, "none") 178 || !RTStrICmp(pszType, "hdd")) 179 errorArgument("DVD/HardDisk Drives can't be changed while the VM is still running\n"); 180 if (pszPassThrough) 181 errorArgument("Drive passthrough state can't be changed while the VM is still running\n"); 182 175 if ( fRunTime 176 && ( !RTStrICmp(pszMedium, "none") 177 || !RTStrICmp(pszType, "hdd"))) 178 { 179 errorArgument("DVD/HardDisk Drives can't be changed while the VM is still running\n"); 183 180 goto leave; 184 181 } 182 183 if (fRunTime && pszPassThrough) 184 { 185 errorArgument("Drive passthrough state can't be changed while the VM is still running\n"); 186 goto leave; 187 } 188 185 189 186 190 /* get the mutable session machine */ … … 214 218 { 215 219 /* just unmount the floppy/dvd */ 216 CHECK_ERROR (machine, MountMedium(Bstr(pszCtl), port, device, NULL)); 220 CHECK_ERROR (machine, MountMedium(Bstr(pszCtl), port, device, Bstr(""))); 221 } 222 else 223 { 224 errorArgument("No DVD/Floppy Drive attached to the controller '%s'" 225 "at the port: %u, device: %u", pszCtl, port, device); 226 goto leave; 217 227 } 218 228 } … … 239 249 /* attach a empty floppy/dvd drive after removing previous attachment */ 240 250 machine->DetachDevice(Bstr(pszCtl), port, device); 241 CHECK_ERROR (machine, AttachDevice(Bstr(pszCtl), port, device, deviceType, NULL));251 CHECK_ERROR (machine, AttachDevice(Bstr(pszCtl), port, device, deviceType, Bstr(""))); 242 252 } 243 253 } … … 269 279 { 270 280 machine->DetachDevice(Bstr(pszCtl), port, device); 271 rc = machine->AttachDevice(Bstr(pszCtl), port, device, DeviceType_DVD, NULL);281 rc = machine->AttachDevice(Bstr(pszCtl), port, device, DeviceType_DVD, Bstr("")); 272 282 } 273 283 } 274 284 else 275 285 { 276 rc = machine->AttachDevice(Bstr(pszCtl), port, device, DeviceType_DVD, NULL);286 rc = machine->AttachDevice(Bstr(pszCtl), port, device, DeviceType_DVD, Bstr("")); 277 287 } 278 288 } … … 393 403 if ( !fRunTime 394 404 && !floppyAttachment) 395 CHECK_ERROR (machine, AttachDevice(Bstr(pszCtl), port, device, DeviceType_Floppy, NULL));405 CHECK_ERROR (machine, AttachDevice(Bstr(pszCtl), port, device, DeviceType_Floppy, Bstr(""))); 396 406 397 407 /* host drive? */
Note:
See TracChangeset
for help on using the changeset viewer.