Changeset 7442 in vbox
- Timestamp:
- Mar 13, 2008 2:33:18 PM (17 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 added
- 44 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r7379 r7442 1060 1060 ComPtr<IHardDisk> hardDisk; 1061 1061 Bstr filePath; 1062 rc = machine->GetHardDisk( DiskControllerType_IDE0, 0, hardDisk.asOutParam());1062 rc = machine->GetHardDisk(StorageBus_IDE, 0, 0, hardDisk.asOutParam()); 1063 1063 if (SUCCEEDED(rc) && hardDisk) 1064 1064 { … … 1083 1083 RTPrintf("hda=\"none\"\n"); 1084 1084 } 1085 rc = machine->GetHardDisk( DiskControllerType_IDE0, 1, hardDisk.asOutParam());1085 rc = machine->GetHardDisk(StorageBus_IDE, 0, 1, hardDisk.asOutParam()); 1086 1086 if (SUCCEEDED(rc) && hardDisk) 1087 1087 { … … 1106 1106 RTPrintf("hdb=\"none\"\n"); 1107 1107 } 1108 rc = machine->GetHardDisk( DiskControllerType_IDE1, 1, hardDisk.asOutParam());1108 rc = machine->GetHardDisk(StorageBus_IDE, 1, 1, hardDisk.asOutParam()); 1109 1109 if (SUCCEEDED(rc) && hardDisk) 1110 1110 { … … 4510 4510 if (strcmp(hdds[0], "none") == 0) 4511 4511 { 4512 machine->DetachHardDisk( DiskControllerType_IDE0, 0);4512 machine->DetachHardDisk(StorageBus_IDE, 0, 0); 4513 4513 } 4514 4514 else … … 4543 4543 { 4544 4544 hardDisk->COMGETTER(Id)(uuid.asOutParam()); 4545 CHECK_ERROR(machine, AttachHardDisk(uuid, DiskControllerType_IDE0, 0));4545 CHECK_ERROR(machine, AttachHardDisk(uuid, StorageBus_IDE, 0, 0)); 4546 4546 } 4547 4547 else … … 4555 4555 if (strcmp(hdds[1], "none") == 0) 4556 4556 { 4557 machine->DetachHardDisk( DiskControllerType_IDE0, 1);4557 machine->DetachHardDisk(StorageBus_IDE, 0, 1); 4558 4558 } 4559 4559 else … … 4588 4588 { 4589 4589 hardDisk->COMGETTER(Id)(uuid.asOutParam()); 4590 CHECK_ERROR(machine, AttachHardDisk(uuid, DiskControllerType_IDE0, 1));4590 CHECK_ERROR(machine, AttachHardDisk(uuid, StorageBus_IDE, 0, 1)); 4591 4591 } 4592 4592 else … … 4600 4600 if (strcmp(hdds[2], "none") == 0) 4601 4601 { 4602 machine->DetachHardDisk( DiskControllerType_IDE1, 1);4602 machine->DetachHardDisk(StorageBus_IDE, 1, 1); 4603 4603 } 4604 4604 else … … 4633 4633 { 4634 4634 hardDisk->COMGETTER(Id)(uuid.asOutParam()); 4635 CHECK_ERROR(machine, AttachHardDisk(uuid, DiskControllerType_IDE1, 1));4635 CHECK_ERROR(machine, AttachHardDisk(uuid, StorageBus_IDE, 1, 1)); 4636 4636 } 4637 4637 else -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r7379 r7442 1616 1616 Guid uuid; 1617 1617 hardDisk->COMGETTER(Id)(uuid.asOutParam()); 1618 gMachine->DetachHardDisk( DiskControllerType_IDE0, 0);1619 gMachine->AttachHardDisk(uuid, DiskControllerType_IDE0, 0);1618 gMachine->DetachHardDisk(StorageBus_IDE, 0, 0); 1619 gMachine->AttachHardDisk(uuid, StorageBus_IDE, 0, 0); 1620 1620 /// @todo why is this attachment saved? 1621 1621 } -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
r7342 r7442 215 215 } 216 216 217 QString toString (KDiskControllerType t) const 218 { 219 AssertMsg (!diskControllerTypes [t].isNull(), ("No text for %d", t)); 220 return diskControllerTypes [t]; 221 } 217 QString toString (KStorageBus t) const 218 { 219 AssertMsg (!storageBuses [t].isNull(), ("No text for %d", t)); 220 return storageBuses [t]; 221 } 222 223 QString toString (KStorageBus t, LONG c) const; 224 QString toString (KStorageBus t, LONG c, LONG d) const; 222 225 223 226 QString toString (KHardDiskType t) const … … 316 319 return toString (aHD.GetType()); 317 320 } 318 319 QString toString (KDiskControllerType t, LONG d) const;320 321 321 322 QString toString (KDeviceType t) const … … 631 632 QStringVector sessionStates; 632 633 QStringVector deviceTypes; 633 QStringVector diskControllerTypes; 634 QStringVector storageBuses; 635 QStringVector storageBusDevices; 636 QStringVector storageBusChannels; 634 637 QStringVector diskTypes; 635 638 QStringVector diskStorageTypes; … … 637 640 QStringVector portModeTypes; 638 641 QStringVector usbFilterActionTypes; 639 QStringVector diskControllerDevices;640 642 QStringVector audioDriverTypes; 641 643 QStringVector audioControllerTypes; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r7342 r7442 196 196 const CVirtualDiskImage &vdi, const CProgress &progress); 197 197 void cannotAttachHardDisk (QWidget *parent, const CMachine &m, const QUuid &id, 198 K DiskControllerType ctl, LONG dev);198 KStorageBus bus, LONG channel, LONG dev); 199 199 void cannotDetachHardDisk (QWidget *parent, const CMachine &m, 200 K DiskControllerType ctl, LONG dev);200 KStorageBus bus, LONG channel, LONG dev); 201 201 void cannotRegisterMedia (QWidget *parent, const CVirtualBox &vbox, 202 202 VBoxDefs::DiskType type, const QString &src); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r7207 r7442 1744 1744 CHardDisk hd = hda.GetHardDisk(); 1745 1745 data += QString ("<br><nobr><b>%1 %2</b>: %3</nobr>") 1746 .arg (vboxGlobal().toString (hda.Get Controller()))1747 .arg (vboxGlobal().toString (hda.Get Controller(),1748 hda.GetDeviceNumber()))1746 .arg (vboxGlobal().toString (hda.GetBus(), hda.GetChannel())) 1747 .arg (vboxGlobal().toString (hda.GetBus(), hda.GetChannel(), 1748 hda.GetDevice())) 1749 1749 .arg (QDir::convertSeparators (hd.GetLocation())); 1750 1750 hasDisks = true; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r7382 r7442 741 741 , sessionStates (KSessionState_COUNT) 742 742 , deviceTypes (KDeviceType_COUNT) 743 , diskControllerTypes (KDiskControllerType_COUNT) 743 , storageBuses (KStorageBus_COUNT) 744 , storageBusDevices (3) 745 , storageBusChannels (3) 744 746 , diskTypes (KHardDiskType_COUNT) 745 747 , diskStorageTypes (KHardDiskStorageType_COUNT) … … 747 749 , portModeTypes (KPortMode_COUNT) 748 750 , usbFilterActionTypes (KUSBDeviceFilterAction_COUNT) 749 , diskControllerDevices (3)750 751 , audioDriverTypes (KAudioDriverType_COUNT) 751 752 , audioControllerTypes (KAudioControllerType_COUNT) … … 963 964 } 964 965 965 QString VBoxGlobal::toString (KDiskControllerType t, LONG d) const 966 { 967 Assert (diskControllerDevices.count() == 3); 966 QString VBoxGlobal::toString (KStorageBus t, LONG c, LONG d) const 967 { 968 Assert (storageBusDevices.count() == 3); 969 QString dev; 970 971 NOREF(c); 972 switch (t) 973 { 974 case KStorageBus_IDE: 975 { 976 if (d == 0 || d == 1) 977 { 978 dev = storageBusDevices [d]; 979 break; 980 } 981 } 982 default: 983 dev = storageBusDevices [2].arg (d); 984 } 985 return dev; 986 } 987 988 QString VBoxGlobal::toString (KStorageBus t, LONG c) const 989 { 990 Assert (storageBusChannels.count() == 3); 968 991 QString dev; 969 992 switch (t) 970 993 { 971 case KDiskControllerType_IDE0: 972 case KDiskControllerType_IDE1: 973 { 974 if (d == 0 || d == 1) 994 case KStorageBus_IDE: 995 { 996 if (c == 0 || c == 1) 975 997 { 976 dev = diskControllerDevices [d];998 dev = storageBusChannels [c]; 977 999 break; 978 1000 } 979 // fall through980 1001 } 981 1002 default: 982 dev = diskControllerDevices [2].arg (d);1003 dev = storageBusChannels [2].arg (c); 983 1004 } 984 1005 return dev; … … 1375 1396 hardDisks += QString (sSectionItemTpl) 1376 1397 .arg (QString ("%1 %2") 1377 .arg (toString (hda.Get Controller()))1378 .arg (toString (hda.Get Controller(),1379 hda.GetDevice Number())))1398 .arg (toString (hda.GetBus(), hda.GetChannel())) 1399 .arg (toString (hda.GetBus(), hda.GetChannel(), 1400 hda.GetDevice()))) 1380 1401 .arg (QString ("%1 [<nobr>%2</nobr>]") 1381 1402 .arg (prepareFileNameForHTML (src)) … … 2270 2291 deviceTypes [KDeviceType_HardDisk] = tr ("Hard Disk", "DeviceType"); 2271 2292 deviceTypes [KDeviceType_Network] = tr ("Network", "DeviceType"); 2272 2273 diskControllerTypes [KDiskControllerType_IDE0] = 2274 tr ("Primary", "DiskControllerType"); 2275 diskControllerTypes [KDiskControllerType_IDE1] = 2276 tr ("Secondary", "DiskControllerType"); 2293 deviceTypes [KDeviceType_USB] = tr ("USB", "DeviceType"); 2294 deviceTypes [KDeviceType_SharedFolder] = tr ("Shared Folder", "DeviceType"); 2295 2296 storageBuses [KStorageBus_IDE] = 2297 tr ("IDE", "StorageBus"); 2298 storageBuses [KStorageBus_SATA] = 2299 tr ("SATA", "StorageBus"); 2300 2301 Assert (storageBusChannels.count() == 3); 2302 storageBusChannels [0] = 2303 tr ("Primary", "StorageBusChannel"); 2304 storageBusChannels [1] = 2305 tr ("Secondary", "StorageBusChannel"); 2306 storageBusChannels [2] = 2307 tr ("Channel %1", "StorageBusChannel"); 2308 2309 Assert (storageBusDevices.count() == 3); 2310 storageBusDevices [0] = tr ("Master", "StorageBusDevice"); 2311 storageBusDevices [1] = tr ("Slave", "StorageBusDevice"); 2312 storageBusDevices [2] = tr ("Device %1", "StorageBusDevice"); 2277 2313 2278 2314 diskTypes [KHardDiskType_Normal] = … … 2312 2348 usbFilterActionTypes [KUSBDeviceFilterAction_Hold] = 2313 2349 tr ("Hold", "USBFilterActionType"); 2314 2315 Assert (diskControllerDevices.count() == 3);2316 diskControllerDevices [0] = tr ("Master", "DiskControllerDevice");2317 diskControllerDevices [1] = tr ("Slave", "DiskControllerDevice");2318 diskControllerDevices [2] = tr ("Device %1", "DiskControllerDevice");2319 2350 2320 2351 audioDriverTypes [KAudioDriverType_Null] = -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
r7380 r7442 1066 1066 void VBoxProblemReporter::cannotAttachHardDisk ( 1067 1067 QWidget *parent, const CMachine &m, const QUuid &id, 1068 K DiskControllerType ctl, LONG dev)1068 KStorageBus bus, LONG channel, LONG dev) 1069 1069 { 1070 1070 message (parent, Error, 1071 1071 tr ("Failed to attach a hard disk image with UUID %1 " 1072 "to the device slot %2 of the controller %3 of the machine <b>%4</b>.") 1073 .arg (id).arg (vboxGlobal().toString (ctl, dev)) 1074 .arg (vboxGlobal().toString (ctl)) 1072 "to device slot %2 on channel %3 of the %4 bus of the machine <b>%5</b>.") 1073 .arg (id) 1074 .arg (vboxGlobal().toString (bus, channel, dev)) 1075 .arg (vboxGlobal().toString (bus, channel)) 1076 .arg (vboxGlobal().toString (bus)) 1075 1077 .arg (CMachine (m).GetName()), 1076 1078 formatErrorInfo (m)); … … 1079 1081 void VBoxProblemReporter::cannotDetachHardDisk ( 1080 1082 QWidget *parent, const CMachine &m, 1081 K DiskControllerType ctl, LONG dev)1083 KStorageBus bus, LONG channel, LONG dev) 1082 1084 { 1083 1085 message (parent, Error, 1084 1086 tr ("Failed to detach a hard disk image " 1085 "from the device slot %1 of the controller %2 of the machine <b>%3</b>.") 1086 .arg (vboxGlobal().toString (ctl, dev)) 1087 .arg (vboxGlobal().toString (ctl)) 1087 "from device slot %1 on channel %2 of the %3 bus of the machine <b>%4</b>.") 1088 .arg (vboxGlobal().toString (bus, channel, dev)) 1089 .arg (vboxGlobal().toString (bus, channel)) 1090 .arg (vboxGlobal().toString (bus)) 1088 1091 .arg (CMachine (m).GetName()), 1089 1092 formatErrorInfo (m)); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r7207 r7442 846 846 { 847 847 CHardDiskAttachment att = hen.GetNext(); 848 machine.DetachHardDisk (att.Get Controller(), att.GetDeviceNumber());848 machine.DetachHardDisk (att.GetBus(), att.GetChannel(), att.GetDevice()); 849 849 } 850 850 } -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui.h
r7207 r7442 2180 2180 if (hda.GetHardDisk().GetId() == aItemId) 2181 2181 { 2182 machine.DetachHardDisk (hda.GetController(), 2183 hda.GetDeviceNumber()); 2182 machine.DetachHardDisk (hda.GetBus(), 2183 hda.GetChannel(), 2184 hda.GetDevice()); 2184 2185 if (!machine.isOk()) 2185 2186 vboxProblem().cannotDetachHardDisk (this, 2186 machine, hda.Get Controller(), hda.GetDeviceNumber());2187 machine, hda.GetBus(), hda.GetChannel(), hda.GetDevice()); 2187 2188 break; 2188 2189 } -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxNewVMWzd.ui.h
r7207 r7442 361 361 { 362 362 CMachine m = session.GetMachine(); 363 m.AttachHardDisk (uuidHD, K DiskControllerType_IDE0, 0);363 m.AttachHardDisk (uuidHD, KStorageBus_IDE, 0, 0); 364 364 if (m.isOk()) 365 365 { … … 372 372 else 373 373 vboxProblem().cannotAttachHardDisk (this, m, uuidHD, 374 K DiskControllerType_IDE0, 0);374 KStorageBus_IDE, 0, 0); 375 375 session.Close(); 376 376 } -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMInformationDlg.ui
r7207 r7442 160 160 <function returnType="QString" access="pritave">parseStatistics( const QString & )</function> 161 161 <function access="private">refreshStatistics()</function> 162 <function returnType="QString" access="pritave">formatHardDisk( const QString &, K DiskControllerType, LONG, int, int )</function>162 <function returnType="QString" access="pritave">formatHardDisk( const QString &, KStorageBus, LONG, LONG, int, int )</function> 163 163 <function returnType="QString" access="pritave">formatAdapter( const QString &, ULONG, int, int )</function> 164 164 <function returnType="QString" access="pritave">composeArticle( const QString &, int, int )</function> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMInformationDlg.ui.h
r7236 r7442 475 475 /* Hard Disk Statistics. */ 476 476 QString primaryMaster = QString ("%1 %2") 477 .arg (vboxGlobal().toString (K DiskControllerType_IDE0))478 .arg (vboxGlobal().toString (K DiskControllerType_IDE0, 0));477 .arg (vboxGlobal().toString (KStorageBus_IDE, 0)) 478 .arg (vboxGlobal().toString (KStorageBus_IDE, 0, 0)); 479 479 QString primarySlave = QString ("%1 %2") 480 .arg (vboxGlobal().toString (K DiskControllerType_IDE0))481 .arg (vboxGlobal().toString (K DiskControllerType_IDE0, 1));480 .arg (vboxGlobal().toString (KStorageBus_IDE, 0)) 481 .arg (vboxGlobal().toString (KStorageBus_IDE, 0, 1)); 482 482 QString secondarySlave = QString ("%1 %2") 483 .arg (vboxGlobal().toString (K DiskControllerType_IDE1))484 .arg (vboxGlobal().toString (K DiskControllerType_IDE1, 1));483 .arg (vboxGlobal().toString (KStorageBus_IDE, 1)) 484 .arg (vboxGlobal().toString (KStorageBus_IDE, 1, 1)); 485 485 486 486 result += hdrRow.arg ("hd_16px.png").arg (tr ("IDE Hard Disk Statistics")); 487 result += formatHardDisk (primaryMaster, K DiskControllerType_IDE0, 0, 0, 1);487 result += formatHardDisk (primaryMaster, KStorageBus_IDE, 0, 0, 0, 1); 488 488 result += interline; 489 result += formatHardDisk (primarySlave, K DiskControllerType_IDE0, 1, 4, 5);489 result += formatHardDisk (primarySlave, KStorageBus_IDE, 0, 1, 4, 5); 490 490 result += interline; 491 result += formatHardDisk (secondarySlave, K DiskControllerType_IDE1, 1, 12, 13);491 result += formatHardDisk (secondarySlave, KStorageBus_IDE, 1, 1, 12, 13); 492 492 result += paragraph; 493 493 494 494 /* CD/DVD-ROM Statistics. */ 495 495 result += hdrRow.arg ("cd_16px.png").arg (tr ("CD/DVD-ROM Statistics")); 496 result += formatHardDisk (QString::null /* tr ("Secondary Master") */,497 K DiskControllerType_IDE1, 0, 8, 9);496 result += formatHardDisk (QString::null, 497 KStorageBus_IDE, 1, 0, 8, 9); 498 498 result += paragraph; 499 499 … … 514 514 515 515 QString VBoxVMInformationDlg::formatHardDisk (const QString &aName, 516 K DiskControllerType aType,517 LONG a Slot, int aStart, int aFinish)516 KStorageBus aBus, LONG aChannel, 517 LONG aDevice, int aStart, int aFinish) 518 518 { 519 519 if (mSession.isNull()) … … 524 524 525 525 QString result = aName.isNull() ? QString::null : header.arg (aName); 526 CHardDisk hd = machine.GetHardDisk (a Type, aSlot);527 if (!hd.isNull() || (a Type == KDiskControllerType_IDE1 && aSlot== 0))526 CHardDisk hd = machine.GetHardDisk (aBus, aChannel, aDevice); 527 if (!hd.isNull() || (aBus == KStorageBus_IDE && aChannel == 1 && aDevice == 0)) 528 528 { 529 529 result += composeArticle (QString::null, aStart, aFinish); -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h
r7207 r7442 1703 1703 struct 1704 1704 { 1705 KDiskControllerType ctl; 1705 KStorageBus bus; 1706 LONG channel; 1706 1707 LONG dev; 1707 1708 struct { … … 1714 1715 diskSet[] = 1715 1716 { 1716 { K DiskControllerType_IDE0, 0, {grbHDA, cbHDA, txHDA, &uuidHDA} },1717 { K DiskControllerType_IDE0, 1, {grbHDB, cbHDB, txHDB, &uuidHDB} },1718 { K DiskControllerType_IDE1, 1, {grbHDD, cbHDD, txHDD, &uuidHDD} },1717 { KStorageBus_IDE, 0, 0, {grbHDA, cbHDA, txHDA, &uuidHDA} }, 1718 { KStorageBus_IDE, 0, 1, {grbHDB, cbHDB, txHDB, &uuidHDB} }, 1719 { KStorageBus_IDE, 1, 1, {grbHDD, cbHDD, txHDD, &uuidHDD} }, 1719 1720 }; 1720 1721 … … 1730 1731 for (uint i = 0; i < SIZEOF_ARRAY (diskSet); i++) 1731 1732 { 1732 if (diskSet [i].ctl == hda.GetController() && 1733 diskSet [i].dev == hda.GetDeviceNumber()) 1733 if (diskSet [i].bus == hda.GetBus() && 1734 diskSet [i].channel == hda.GetChannel() && 1735 diskSet [i].dev == hda.GetDevice()) 1734 1736 { 1735 1737 CHardDisk hd = hda.GetHardDisk(); … … 2086 2088 struct 2087 2089 { 2088 KDiskControllerType ctl; 2090 KStorageBus bus; 2091 LONG channel; 2089 2092 LONG dev; 2090 2093 struct { … … 2095 2098 diskSet[] = 2096 2099 { 2097 { K DiskControllerType_IDE0, 0, {grbHDA, &uuidHDA} },2098 { K DiskControllerType_IDE0, 1, {grbHDB, &uuidHDB} },2099 { K DiskControllerType_IDE1, 1, {grbHDD, &uuidHDD} }2100 { KStorageBus_IDE, 0, 0, {grbHDA, &uuidHDA} }, 2101 { KStorageBus_IDE, 0, 1, {grbHDB, &uuidHDB} }, 2102 { KStorageBus_IDE, 1, 1, {grbHDD, &uuidHDD} } 2100 2103 }; 2101 2104 … … 2111 2114 for (uint i = 0; i < SIZEOF_ARRAY (diskSet); i++) 2112 2115 { 2113 if (diskSet [i].ctl == hda.GetController() && 2114 diskSet [i].dev == hda.GetDeviceNumber()) 2116 if (diskSet [i].bus == hda.GetBus() && 2117 diskSet [i].channel == hda.GetChannel() && 2118 diskSet [i].dev == hda.GetDevice()) 2115 2119 { 2116 cmachine.DetachHardDisk (diskSet [i]. ctl, diskSet [i].dev);2120 cmachine.DetachHardDisk (diskSet [i].bus, diskSet [i].channel, diskSet [i].dev); 2117 2121 if (!cmachine.isOk()) 2118 2122 vboxProblem().cannotDetachHardDisk ( 2119 this, cmachine, diskSet [i]. ctl, diskSet [i].dev);2123 this, cmachine, diskSet [i].bus, diskSet [i].channel, diskSet [i].dev); 2120 2124 } 2121 2125 } … … 2128 2132 if (diskSet [i].data.grb->isChecked() && !(*newId).isNull()) 2129 2133 { 2130 cmachine.AttachHardDisk (*newId, diskSet [i]. ctl, diskSet [i].dev);2134 cmachine.AttachHardDisk (*newId, diskSet [i].bus, diskSet [i].channel, diskSet [i].dev); 2131 2135 if (!cmachine.isOk()) 2132 2136 vboxProblem().cannotAttachHardDisk ( 2133 this, cmachine, *newId, diskSet [i]. ctl, diskSet [i].dev);2137 this, cmachine, *newId, diskSet [i].bus, diskSet [i].channel, diskSet [i].dev); 2134 2138 } 2135 2139 } -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobal.h
r7372 r7442 218 218 } 219 219 220 QString toString (KDiskControllerType t) const 221 { 222 AssertMsg (!diskControllerTypes [t].isNull(), ("No text for %d", t)); 223 return diskControllerTypes [t]; 224 } 220 QString toString (KStorageBus t) const 221 { 222 AssertMsg (!storageBuses [t].isNull(), ("No text for %d", t)); 223 return storageBuses [t]; 224 } 225 226 QString toString (KStorageBus t, LONG c) const; 227 QString toString (KStorageBus t, LONG c, LONG d) const; 225 228 226 229 QString toString (KHardDiskType t) const … … 319 322 return toString (aHD.GetType()); 320 323 } 321 322 QString toString (KDiskControllerType t, LONG d) const;323 324 324 325 QString toString (KDeviceType t) const … … 636 637 QStringVector sessionStates; 637 638 QStringVector deviceTypes; 638 QStringVector diskControllerTypes; 639 QStringVector storageBuses; 640 QStringVector storageBusDevices; 641 QStringVector storageBusChannels; 639 642 QStringVector diskTypes; 640 643 QStringVector diskStorageTypes; … … 642 645 QStringVector portModeTypes; 643 646 QStringVector usbFilterActionTypes; 644 QStringVector diskControllerDevices;645 647 QStringVector audioDriverTypes; 646 648 QStringVector audioControllerTypes; -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxProblemReporter.h
r7369 r7442 195 195 const CVirtualDiskImage &vdi, const CProgress &progress); 196 196 void cannotAttachHardDisk (QWidget *parent, const CMachine &m, const QUuid &id, 197 K DiskControllerType ctl, LONG dev);197 KStorageBus bus, LONG channel, LONG dev); 198 198 void cannotDetachHardDisk (QWidget *parent, const CMachine &m, 199 K DiskControllerType ctl, LONG dev);199 KStorageBus bus, LONG channel, LONG dev); 200 200 void cannotRegisterMedia (QWidget *parent, const CVirtualBox &vbox, 201 201 VBoxDefs::DiskType type, const QString &src); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r7412 r7442 1759 1759 CHardDisk hd = hda.GetHardDisk(); 1760 1760 data += QString ("<br><nobr><b>%1 %2</b>: %3</nobr>") 1761 .arg (vboxGlobal().toString (hda.Get Controller()))1762 .arg (vboxGlobal().toString (hda.Get Controller(),1763 hda.GetDeviceNumber()))1761 .arg (vboxGlobal().toString (hda.GetBus(), hda.GetChannel())) 1762 .arg (vboxGlobal().toString (hda.GetBus(), hda.GetChannel(), 1763 hda.GetDevice())) 1764 1764 .arg (QDir::convertSeparators (hd.GetLocation())); 1765 1765 hasDisks = true; -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp
r7423 r7442 752 752 , sessionStates (KSessionState_COUNT) 753 753 , deviceTypes (KDeviceType_COUNT) 754 , diskControllerTypes (KDiskControllerType_COUNT) 754 , storageBuses (KStorageBus_COUNT) 755 , storageBusDevices (3) 756 , storageBusChannels (3) 755 757 , diskTypes (KHardDiskType_COUNT) 756 758 , diskStorageTypes (KHardDiskStorageType_COUNT) … … 758 760 , portModeTypes (KPortMode_COUNT) 759 761 , usbFilterActionTypes (KUSBDeviceFilterAction_COUNT) 760 , diskControllerDevices (3)761 762 , audioDriverTypes (KAudioDriverType_COUNT) 762 763 , audioControllerTypes (KAudioControllerType_COUNT) … … 974 975 } 975 976 976 QString VBoxGlobal::toString (KDiskControllerType t, LONG d) const 977 { 978 Assert (diskControllerDevices.count() == 3); 977 QString VBoxGlobal::toString (KStorageBus t, LONG c, LONG d) const 978 { 979 Assert (storageBusDevices.count() == 3); 980 QString dev; 981 982 NOREF(c); 983 switch (t) 984 { 985 case KStorageBus_IDE: 986 { 987 if (d == 0 || d == 1) 988 { 989 dev = storageBusDevices [d]; 990 break; 991 } 992 } 993 default: 994 dev = storageBusDevices [2].arg (d); 995 } 996 return dev; 997 } 998 999 QString VBoxGlobal::toString (KStorageBus t, LONG c) const 1000 { 1001 Assert (storageBusChannels.count() == 3); 979 1002 QString dev; 980 1003 switch (t) 981 1004 { 982 case KDiskControllerType_IDE0: 983 case KDiskControllerType_IDE1: 984 { 985 if (d == 0 || d == 1) 1005 case KStorageBus_IDE: 1006 { 1007 if (c == 0 || c == 1) 986 1008 { 987 dev = diskControllerDevices [d];1009 dev = storageBusChannels [c]; 988 1010 break; 989 1011 } 990 // fall through991 1012 } 992 1013 default: 993 dev = diskControllerDevices [2].arg (d);1014 dev = storageBusChannels [2].arg (c); 994 1015 } 995 1016 return dev; … … 1386 1407 hardDisks += QString (sSectionItemTpl) 1387 1408 .arg (QString ("%1 %2") 1388 .arg (toString (hda.Get Controller()))1389 .arg (toString (hda.Get Controller(),1390 hda.GetDevice Number())))1409 .arg (toString (hda.GetBus(), hda.GetChannel())) 1410 .arg (toString (hda.GetBus(), hda.GetChannel(), 1411 hda.GetDevice()))) 1391 1412 .arg (QString ("%1 [<nobr>%2</nobr>]") 1392 1413 .arg (prepareFileNameForHTML (src)) … … 2280 2301 deviceTypes [KDeviceType_HardDisk] = tr ("Hard Disk", "DeviceType"); 2281 2302 deviceTypes [KDeviceType_Network] = tr ("Network", "DeviceType"); 2282 2283 diskControllerTypes [KDiskControllerType_IDE0] = 2284 tr ("Primary", "DiskControllerType"); 2285 diskControllerTypes [KDiskControllerType_IDE1] = 2286 tr ("Secondary", "DiskControllerType"); 2303 deviceTypes [KDeviceType_USB] = tr ("USB", "DeviceType"); 2304 deviceTypes [KDeviceType_SharedFolder] = tr ("Shared Folder", "DeviceType"); 2305 2306 storageBuses [KStorageBus_IDE] = 2307 tr ("IDE", "StorageBus"); 2308 storageBuses [KStorageBus_SATA] = 2309 tr ("SATA", "StorageBus"); 2310 2311 Assert (storageBusChannels.count() == 3); 2312 storageBusChannels [0] = 2313 tr ("Primary", "StorageBusChannel"); 2314 storageBusChannels [1] = 2315 tr ("Secondary", "StorageBusChannel"); 2316 storageBusChannels [2] = 2317 tr ("Channel %1", "StorageBusChannel"); 2318 2319 Assert (storageBusDevices.count() == 3); 2320 storageBusDevices [0] = tr ("Master", "StorageBusDevice"); 2321 storageBusDevices [1] = tr ("Slave", "StorageBusDevice"); 2322 storageBusDevices [2] = tr ("Device %1", "StorageBusDevice"); 2287 2323 2288 2324 diskTypes [KHardDiskType_Normal] = … … 2322 2358 usbFilterActionTypes [KUSBDeviceFilterAction_Hold] = 2323 2359 tr ("Hold", "USBFilterActionType"); 2324 2325 Assert (diskControllerDevices.count() == 3);2326 diskControllerDevices [0] = tr ("Master", "DiskControllerDevice");2327 diskControllerDevices [1] = tr ("Slave", "DiskControllerDevice");2328 diskControllerDevices [2] = tr ("Device %1", "DiskControllerDevice");2329 2360 2330 2361 audioDriverTypes [KAudioDriverType_Null] = -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxProblemReporter.cpp
r7380 r7442 1074 1074 void VBoxProblemReporter::cannotAttachHardDisk ( 1075 1075 QWidget *parent, const CMachine &m, const QUuid &id, 1076 K DiskControllerType ctl, LONG dev)1076 KStorageBus bus, LONG channel, LONG dev) 1077 1077 { 1078 1078 message (parent, Error, 1079 1079 tr ("Failed to attach a hard disk image with UUID %1 " 1080 "to the device slot %2 of the controller %3 of the machine <b>%4</b>.") 1081 .arg (id).arg (vboxGlobal().toString (ctl, dev)) 1082 .arg (vboxGlobal().toString (ctl)) 1080 "to device slot %2 on channel %3 of the %4 bus of the machine <b>%5</b>.") 1081 .arg (id) 1082 .arg (vboxGlobal().toString (bus, channel, dev)) 1083 .arg (vboxGlobal().toString (bus, channel)) 1084 .arg (vboxGlobal().toString (bus)) 1083 1085 .arg (CMachine (m).GetName()), 1084 1086 formatErrorInfo (m)); … … 1087 1089 void VBoxProblemReporter::cannotDetachHardDisk ( 1088 1090 QWidget *parent, const CMachine &m, 1089 K DiskControllerType ctl, LONG dev)1091 KStorageBus bus, LONG channel, LONG dev) 1090 1092 { 1091 1093 message (parent, Error, 1092 1094 tr ("Failed to detach a hard disk image " 1093 "from the device slot %1 of the controller %2 of the machine <b>%3</b>.") 1094 .arg (vboxGlobal().toString (ctl, dev)) 1095 .arg (vboxGlobal().toString (ctl)) 1095 "from device slot %1 on channel %2 of the %3 bus of the machine <b>%4</b>.") 1096 .arg (vboxGlobal().toString (bus, channel, dev)) 1097 .arg (vboxGlobal().toString (bus, channel)) 1098 .arg (vboxGlobal().toString (bus)) 1096 1099 .arg (CMachine (m).GetName()), 1097 1100 formatErrorInfo (m)); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp
r7334 r7442 850 850 { 851 851 CHardDiskAttachment att = hen.GetNext(); 852 machine.DetachHardDisk (att.Get Controller(), att.GetDeviceNumber());852 machine.DetachHardDisk (att.GetBus(), att.GetChannel(), att.GetDevice()); 853 853 } 854 854 } -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxDiskImageManagerDlg.ui.h
r7250 r7442 2205 2205 if (hda.GetHardDisk().GetId() == aItemId) 2206 2206 { 2207 machine.DetachHardDisk (hda.GetController(), 2208 hda.GetDeviceNumber()); 2207 machine.DetachHardDisk (hda.GetBus(), 2208 hda.GetChannel(), 2209 hda.GetDevice()); 2209 2210 if (!machine.isOk()) 2210 2211 vboxProblem().cannotDetachHardDisk (this, 2211 machine, hda.Get Controller(), hda.GetDeviceNumber());2212 machine, hda.GetBus(), hda.GetChannel(), hda.GetDevice()); 2212 2213 break; 2213 2214 } -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxNewVMWzd.ui.h
r7282 r7442 369 369 { 370 370 CMachine m = session.GetMachine(); 371 m.AttachHardDisk (uuidHD, K DiskControllerType_IDE0, 0);371 m.AttachHardDisk (uuidHD, KStorageBus_IDE, 0, 0); 372 372 if (m.isOk()) 373 373 { … … 380 380 else 381 381 vboxProblem().cannotAttachHardDisk (this, m, uuidHD, 382 K DiskControllerType_IDE0, 0);382 KStorageBus_IDE, 0, 0); 383 383 session.Close(); 384 384 } -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMInformationDlg.ui
r7207 r7442 160 160 <function returnType="QString" access="pritave">parseStatistics( const QString & )</function> 161 161 <function access="private">refreshStatistics()</function> 162 <function returnType="QString" access="pritave">formatHardDisk( const QString &, K DiskControllerType, LONG, int, int )</function>162 <function returnType="QString" access="pritave">formatHardDisk( const QString &, KStorageBus, LONG, LONG, int, int )</function> 163 163 <function returnType="QString" access="pritave">formatAdapter( const QString &, ULONG, int, int )</function> 164 164 <function returnType="QString" access="pritave">composeArticle( const QString &, int, int )</function> -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMInformationDlg.ui.h
r7250 r7442 485 485 486 486 /* Hard Disk Statistics. */ 487 QString primaryMaster = QString ("%1 %2") 488 .arg (vboxGlobal().toString (KStorageBus_IDE, 0)) 489 .arg (vboxGlobal().toString (KStorageBus_IDE, 0, 0)); 490 QString primarySlave = QString ("%1 %2") 491 .arg (vboxGlobal().toString (KStorageBus_IDE, 0)) 492 .arg (vboxGlobal().toString (KStorageBus_IDE, 0, 1)); 493 QString secondarySlave = QString ("%1 %2") 494 .arg (vboxGlobal().toString (KStorageBus_IDE, 1)) 495 .arg (vboxGlobal().toString (KStorageBus_IDE, 1, 1)); 496 487 497 result += hdrRow.arg (":/hd_16px.png").arg (tr ("IDE Hard Disk Statistics")); 488 result += formatHardDisk ( tr ("Primary Master"), KDiskControllerType_IDE0, 0, 0, 1);498 result += formatHardDisk (primaryMaster, KStorageBus_IDE, 0, 0, 0, 1); 489 499 result += interline; 490 result += formatHardDisk ( tr ("Primary Slave"), KDiskControllerType_IDE0, 1, 4, 5);500 result += formatHardDisk (primarySlave, KStorageBus_IDE, 0, 1, 4, 5); 491 501 result += interline; 492 result += formatHardDisk ( tr ("Secondary Slave"), KDiskControllerType_IDE1, 1, 12, 13);502 result += formatHardDisk (secondarySlave, KStorageBus_IDE, 1, 1, 12, 13); 493 503 result += paragraph; 494 504 495 505 /* CD/DVD-ROM Statistics. */ 496 506 result += hdrRow.arg (":/cd_16px.png").arg (tr ("CD/DVD-ROM Statistics")); 497 result += formatHardDisk (QString::null /* tr ("Secondary Master") */,498 K DiskControllerType_IDE1, 0, 8, 9);507 result += formatHardDisk (QString::null, 508 KStorageBus_IDE, 1, 0, 8, 9); 499 509 result += paragraph; 500 510 … … 515 525 516 526 QString VBoxVMInformationDlg::formatHardDisk (const QString &aName, 517 K DiskControllerType aType,518 LONG a Slot, int aStart, int aFinish)527 KStorageBus aBus, LONG aChannel, 528 LONG aDevice, int aStart, int aFinish) 519 529 { 520 530 if (mSession.isNull()) … … 525 535 526 536 QString result = aName.isNull() ? QString::null : header.arg (aName); 527 CHardDisk hd = machine.GetHardDisk (a Type, aSlot);528 if (!hd.isNull() || (a Type == KDiskControllerType_IDE1 && aSlot== 0))537 CHardDisk hd = machine.GetHardDisk (aBus, aChannel, aDevice); 538 if (!hd.isNull() || (aBus == KStorageBus_IDE && aChannel == 1 && aDevice == 0)) 529 539 { 530 540 result += composeArticle (QString::null, aStart, aFinish); -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsDlg.ui.h
r7250 r7442 1718 1718 struct 1719 1719 { 1720 KDiskControllerType ctl; 1720 KStorageBus bus; 1721 LONG channel; 1721 1722 LONG dev; 1722 1723 struct { … … 1729 1730 diskSet[] = 1730 1731 { 1731 { K DiskControllerType_IDE0, 0, {grbHDA, cbHDA, txHDA, &uuidHDA} },1732 { K DiskControllerType_IDE0, 1, {grbHDB, cbHDB, txHDB, &uuidHDB} },1733 { K DiskControllerType_IDE1, 1, {grbHDD, cbHDD, txHDD, &uuidHDD} },1732 { KStorageBus_IDE, 0, 0, {grbHDA, cbHDA, txHDA, &uuidHDA} }, 1733 { KStorageBus_IDE, 0, 1, {grbHDB, cbHDB, txHDB, &uuidHDB} }, 1734 { KStorageBus_IDE, 1, 1, {grbHDD, cbHDD, txHDD, &uuidHDD} }, 1734 1735 }; 1735 1736 … … 1745 1746 for (uint i = 0; i < SIZEOF_ARRAY (diskSet); i++) 1746 1747 { 1747 if (diskSet [i].ctl == hda.GetController() && 1748 diskSet [i].dev == hda.GetDeviceNumber()) 1748 if (diskSet [i].bus == hda.GetBus() && 1749 diskSet [i].channel == hda.GetChannel() && 1750 diskSet [i].dev == hda.GetDevice()) 1749 1751 { 1750 1752 CHardDisk hd = hda.GetHardDisk(); … … 2101 2103 struct 2102 2104 { 2103 KDiskControllerType ctl; 2105 KStorageBus bus; 2106 LONG channel; 2104 2107 LONG dev; 2105 2108 struct { … … 2110 2113 diskSet[] = 2111 2114 { 2112 { K DiskControllerType_IDE0, 0, {grbHDA, &uuidHDA} },2113 { K DiskControllerType_IDE0, 1, {grbHDB, &uuidHDB} },2114 { K DiskControllerType_IDE1, 1, {grbHDD, &uuidHDD} }2115 { KStorageBus_IDE, 0, 0, {grbHDA, &uuidHDA} }, 2116 { KStorageBus_IDE, 0, 1, {grbHDB, &uuidHDB} }, 2117 { KStorageBus_IDE, 1, 1, {grbHDD, &uuidHDD} } 2115 2118 }; 2116 2119 … … 2126 2129 for (uint i = 0; i < SIZEOF_ARRAY (diskSet); i++) 2127 2130 { 2128 if (diskSet [i].ctl == hda.GetController() && 2129 diskSet [i].dev == hda.GetDeviceNumber()) 2131 if (diskSet [i].bus == hda.GetBus() && 2132 diskSet [i].channel == hda.GetChannel() && 2133 diskSet [i].dev == hda.GetDevice()) 2130 2134 { 2131 cmachine.DetachHardDisk (diskSet [i]. ctl, diskSet [i].dev);2135 cmachine.DetachHardDisk (diskSet [i].bus, diskSet [i].channel, diskSet [i].dev); 2132 2136 if (!cmachine.isOk()) 2133 2137 vboxProblem().cannotDetachHardDisk ( 2134 this, cmachine, diskSet [i]. ctl, diskSet [i].dev);2138 this, cmachine, diskSet [i].bus, diskSet [i].channel, diskSet [i].dev); 2135 2139 } 2136 2140 } … … 2143 2147 if (diskSet [i].data.grb->isChecked() && !(*newId).isNull()) 2144 2148 { 2145 cmachine.AttachHardDisk (*newId, diskSet [i]. ctl, diskSet [i].dev);2149 cmachine.AttachHardDisk (*newId, diskSet [i].bus, diskSet [i].channel, diskSet [i].dev); 2146 2150 if (!cmachine.isOk()) 2147 2151 vboxProblem().cannotAttachHardDisk ( 2148 this, cmachine, *newId, diskSet [i]. ctl, diskSet [i].dev);2152 this, cmachine, *newId, diskSet [i].bus, diskSet [i].channel, diskSet [i].dev); 2149 2153 } 2150 2154 } -
trunk/src/VBox/Main/ConsoleImpl.cpp
r7418 r7442 6131 6131 ComPtr<IHardDisk> hardDisk; 6132 6132 hrc = hda->COMGETTER(HardDisk)(hardDisk.asOutParam()); H(); 6133 DiskControllerType_T enmCtl;6134 hrc = hda->COMGETTER( Controller)(&enmCtl);H();6133 StorageBus_T enmBus; 6134 hrc = hda->COMGETTER(Bus)(&enmBus); H(); 6135 6135 LONG lDev; 6136 hrc = hda->COMGETTER(DeviceNumber)(&lDev); H(); 6137 6138 int i; 6139 switch (enmCtl) 6140 { 6141 case DiskControllerType_IDE0: 6142 i = 0; 6143 break; 6144 case DiskControllerType_IDE1: 6145 i = 2; 6136 hrc = hda->COMGETTER(Device)(&lDev); H(); 6137 LONG lChannel; 6138 hrc = hda->COMGETTER(Channel)(&lChannel); H(); 6139 6140 int iLUN; 6141 switch (enmBus) 6142 { 6143 case StorageBus_IDE: 6144 { 6145 if (lChannel >= 2) 6146 { 6147 AssertMsgFailed(("invalid controller channel number: %d\n", lChannel)); 6148 return VERR_GENERAL_FAILURE; 6149 } 6150 6151 if (lDev >= 2) 6152 { 6153 AssertMsgFailed(("invalid controller device number: %d\n", lDev)); 6154 return VERR_GENERAL_FAILURE; 6155 } 6156 iLUN = 2*lChannel + lDev; 6157 } 6158 break; 6159 case StorageBus_SATA: 6160 iLUN = lChannel; 6146 6161 break; 6147 6162 default: 6148 AssertMsgFailed(("invalid disk controller type: %d\n", enm Ctl));6163 AssertMsgFailed(("invalid disk controller type: %d\n", enmBus)); 6149 6164 return VERR_GENERAL_FAILURE; 6150 6165 } 6151 6152 if (lDev < 0 || lDev >= 2)6153 {6154 AssertMsgFailed(("invalid controller device number: %d\n", lDev));6155 return VERR_GENERAL_FAILURE;6156 }6157 6158 i = i + lDev;6159 6166 6160 6167 /* … … 6163 6170 */ 6164 6171 PCFGMNODE pCfg; 6165 PCFGMNODE pLunL1 = CFGMR3GetChildF(CFGMR3GetRoot(pVM), "Devices/piix3ide/0/LUN#%d/AttachedDriver/", i );6172 PCFGMNODE pLunL1 = CFGMR3GetChildF(CFGMR3GetRoot(pVM), "Devices/piix3ide/0/LUN#%d/AttachedDriver/", iLUN); 6166 6173 if (!pLunL1) 6167 6174 { … … 6170 6177 6171 6178 PCFGMNODE pLunL0; 6172 rc = CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%d", i );RC_CHECK();6179 rc = CFGMR3InsertNodeF(pInst, &pLunL0, "LUN#%d", iLUN); RC_CHECK(); 6173 6180 rc = CFGMR3InsertString(pLunL0, "Driver", "Block"); RC_CHECK(); 6174 6181 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); … … 6248 6255 } 6249 6256 else 6250 LogFlowFunc (("LUN#%d: old leaf image '%s'\n", i , pszPath));6257 LogFlowFunc (("LUN#%d: old leaf image '%s'\n", iLUN, pszPath)); 6251 6258 6252 6259 MMR3HeapFree(pszPath); … … 6256 6263 * Detach the driver and replace the config node. 6257 6264 */ 6258 rc = PDMR3DeviceDetach(pVM, "piix3ide", 0, i );RC_CHECK();6265 rc = PDMR3DeviceDetach(pVM, "piix3ide", 0, iLUN); RC_CHECK(); 6259 6266 CFGMR3RemoveNode(pCfg); 6260 6267 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); … … 6271 6278 hrc = hardDisk->COMGETTER(Location)(&str); H(); 6272 6279 STR_CONV(); 6273 LogFlowFunc (("LUN#%d: leaf image '%s'\n", i , psz));6280 LogFlowFunc (("LUN#%d: leaf image '%s'\n", iLUN, psz)); 6274 6281 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 6275 6282 STR_FREE(); … … 6303 6310 * Attach the new driver. 6304 6311 */ 6305 rc = PDMR3DeviceAttach(pVM, "piix3ide", 0, i , NULL);RC_CHECK();6312 rc = PDMR3DeviceAttach(pVM, "piix3ide", 0, iLUN, NULL); RC_CHECK(); 6306 6313 6307 6314 LogFlowFunc (("Returns success\n")); -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r7418 r7442 96 96 char *psz = NULL; 97 97 BSTR str = NULL; 98 unsigned i;99 98 100 99 #define STR_CONV() do { rc = RTUtf16ToUtf8(str, &psz); RC_CHECK(); } while (0) … … 224 223 PCFGMNODE pLunL1 = NULL; /* /Devices/Dev/0/LUN#0/AttachedDriver/ */ 225 224 PCFGMNODE pLunL2 = NULL; /* /Devices/Dev/0/LUN#0/AttachedDriver/Config/ */ 225 PCFGMNODE pIdeInst = NULL; /* /Devices/piix3ide/0/ */ 226 PCFGMNODE pSataInst = NULL; /* /Devices/ahci/0/ */ 226 227 227 228 rc = CFGMR3InsertNode(pRoot, "Devices", &pDevices); RC_CHECK(); … … 573 574 */ 574 575 rc = CFGMR3InsertNode(pDevices, "piix3ide", &pDev); /* piix3 */ RC_CHECK(); 575 rc = CFGMR3InsertNode(pDev, "0", &pI nst);RC_CHECK();576 rc = CFGMR3InsertInteger(pI nst, "Trusted", 1);/* boolean */ RC_CHECK();577 rc = CFGMR3InsertInteger(pI nst, "PCIDeviceNo", 1);RC_CHECK();576 rc = CFGMR3InsertNode(pDev, "0", &pIdeInst); RC_CHECK(); 577 rc = CFGMR3InsertInteger(pIdeInst, "Trusted", 1); /* boolean */ RC_CHECK(); 578 rc = CFGMR3InsertInteger(pIdeInst, "PCIDeviceNo", 1); RC_CHECK(); 578 579 Assert(!afPciDeviceNo[1]); 579 580 afPciDeviceNo[1] = true; 580 rc = CFGMR3InsertInteger(pI nst, "PCIFunctionNo", 1);RC_CHECK();581 rc = CFGMR3InsertNode(pI nst, "Config", &pCfg);RC_CHECK();581 rc = CFGMR3InsertInteger(pIdeInst, "PCIFunctionNo", 1); RC_CHECK(); 582 rc = CFGMR3InsertNode(pIdeInst, "Config", &pCfg); RC_CHECK(); 582 583 rc = CFGMR3InsertInteger(pCfg, "PIIX4", fPIIX4); /* boolean */ RC_CHECK(); 583 584 584 585 /* Attach the status driver */ 585 rc = CFGMR3InsertNode(pI nst, "LUN#999", &pLunL0);RC_CHECK();586 rc = CFGMR3InsertNode(pIdeInst, "LUN#999", &pLunL0); RC_CHECK(); 586 587 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 587 588 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); … … 590 591 rc = CFGMR3InsertInteger(pCfg, "Last", 3); RC_CHECK(); 591 592 593 /* 594 * SATA controller 595 */ 596 ComPtr<ISATAController> sataController; 597 hrc = pMachine->COMGETTER(SATAController)(sataController.asOutParam()); 598 BOOL enabled = FALSE; 599 600 if (sataController) 601 { 602 hrc = sataController->COMGETTER(Enabled)(&enabled); H(); 603 604 if (enabled) 605 { 606 rc = CFGMR3InsertNode(pDevices, "ahci", &pDev); RC_CHECK(); 607 rc = CFGMR3InsertNode(pDev, "0", &pSataInst); RC_CHECK(); 608 rc = CFGMR3InsertInteger(pIdeInst, "Trusted", 1); RC_CHECK(); 609 rc = CFGMR3InsertInteger(pIdeInst, "PCIDeviceNo", 13); RC_CHECK(); 610 Assert(!afPciDeviceNo[13]); 611 afPciDeviceNo[13] = true; 612 rc = CFGMR3InsertInteger(pIdeInst, "PCIFunctionNo", 1); RC_CHECK(); 613 rc = CFGMR3InsertNode(pIdeInst, "Config", &pCfg); RC_CHECK(); 614 615 for (uint32_t i = 0; i < 4; i++) 616 { 617 const char *g_apszConfig[] = 618 { "PrimaryMaster", "PrimarySlave", "SecondaryMaster", "SecondarySlave" }; 619 LONG aPortNumber; 620 621 hrc = sataController->GetIDEEmulationPort(i, &aPortNumber); H(); 622 rc = CFGMR3InsertInteger(pCfg, g_apszConfig[i], aPortNumber); RC_CHECK(); 623 } 624 } 625 } 626 592 627 /* Attach the harddisks */ 593 628 ComPtr<IHardDiskAttachmentCollection> hdaColl; … … 600 635 && fMore) 601 636 { 637 PCFGMNODE pHardDiskCtl; 602 638 ComPtr<IHardDiskAttachment> hda; 603 639 hrc = hdaEnum->GetNext(hda.asOutParam()); H(); 604 640 ComPtr<IHardDisk> hardDisk; 605 641 hrc = hda->COMGETTER(HardDisk)(hardDisk.asOutParam()); H(); 606 DiskControllerType_T enmCtl;607 hrc = hda->COMGETTER( Controller)(&enmCtl);H();642 StorageBus_T enmBus; 643 hrc = hda->COMGETTER(Bus)(&enmBus); H(); 608 644 LONG lDev; 609 hrc = hda->COMGETTER(DeviceNumber)(&lDev); H(); 610 611 switch (enmCtl) 612 { 613 case DiskControllerType_IDE0: 614 i = 0; 615 break; 616 case DiskControllerType_IDE1: 617 i = 2; 645 hrc = hda->COMGETTER(Device)(&lDev); H(); 646 LONG lChannel; 647 hrc = hda->COMGETTER(Channel)(&lChannel); H(); 648 649 int iLUN; 650 switch (enmBus) 651 { 652 case StorageBus_IDE: 653 { 654 if (lChannel >= 2 || lChannel < 0) 655 { 656 AssertMsgFailed(("invalid controller channel number: %d\n", lChannel)); 657 return VERR_GENERAL_FAILURE; 658 } 659 660 if (lDev >= 2 || lDev < 0) 661 { 662 AssertMsgFailed(("invalid controller device number: %d\n", lDev)); 663 return VERR_GENERAL_FAILURE; 664 } 665 iLUN = 2*lChannel + lDev; 666 pHardDiskCtl = pIdeInst; 667 } 668 break; 669 case StorageBus_SATA: 670 iLUN = lChannel; 671 pHardDiskCtl = enabled ? pSataInst : NULL; 618 672 break; 619 673 default: 620 AssertMsgFailed(("invalid disk controller type: %d\n", enm Ctl));674 AssertMsgFailed(("invalid disk controller type: %d\n", enmBus)); 621 675 return VERR_GENERAL_FAILURE; 622 676 } 623 677 624 if (lDev < 0 || lDev >= 2) 625 { 626 AssertMsgFailed(("invalid controller device number: %d\n", lDev)); 627 return VERR_GENERAL_FAILURE; 628 } 629 630 i = i + lDev; 631 632 char szLUN[16]; 633 RTStrPrintf(szLUN, sizeof(szLUN), "LUN#%d", i); 634 rc = CFGMR3InsertNode(pInst, szLUN, &pLunL0); RC_CHECK(); 635 rc = CFGMR3InsertString(pLunL0, "Driver", "Block"); RC_CHECK(); 636 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 637 rc = CFGMR3InsertString(pCfg, "Type", "HardDisk"); RC_CHECK(); 638 rc = CFGMR3InsertInteger(pCfg, "Mountable", 0); RC_CHECK(); 639 640 HardDiskStorageType_T hddType; 641 hardDisk->COMGETTER(StorageType)(&hddType); 642 if (hddType == HardDiskStorageType_VirtualDiskImage) 643 { 644 ComPtr<IVirtualDiskImage> vdiDisk = hardDisk; 645 AssertBreak (!vdiDisk.isNull(), hrc = E_FAIL); 646 647 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 648 rc = CFGMR3InsertString(pLunL1, "Driver", "VBoxHDD"); RC_CHECK(); 649 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 650 hrc = vdiDisk->COMGETTER(FilePath)(&str); H(); 651 STR_CONV(); 652 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 653 STR_FREE(); 654 655 /* Create an inversed tree of parents. */ 656 ComPtr<IHardDisk> parentHardDisk = hardDisk; 657 for (PCFGMNODE pParent = pCfg;;) 658 { 659 ComPtr<IHardDisk> curHardDisk; 660 hrc = parentHardDisk->COMGETTER(Parent)(curHardDisk.asOutParam()); H(); 661 if (!curHardDisk) 662 break; 663 664 vdiDisk = curHardDisk; 678 /* Can be NULL if SATA controller is not enabled and current hard disk is attached to SATA controller. */ 679 if (pHardDiskCtl) 680 { 681 char szLUN[16]; 682 RTStrPrintf(szLUN, sizeof(szLUN), "LUN#%d", iLUN); 683 rc = CFGMR3InsertNode(pHardDiskCtl, szLUN, &pLunL0); RC_CHECK(); 684 rc = CFGMR3InsertString(pLunL0, "Driver", "Block"); RC_CHECK(); 685 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 686 rc = CFGMR3InsertString(pCfg, "Type", "HardDisk"); RC_CHECK(); 687 rc = CFGMR3InsertInteger(pCfg, "Mountable", 0); RC_CHECK(); 688 689 HardDiskStorageType_T hddType; 690 hardDisk->COMGETTER(StorageType)(&hddType); 691 if (hddType == HardDiskStorageType_VirtualDiskImage) 692 { 693 ComPtr<IVirtualDiskImage> vdiDisk = hardDisk; 665 694 AssertBreak (!vdiDisk.isNull(), hrc = E_FAIL); 666 695 667 PCFGMNODE pCur; 668 rc = CFGMR3InsertNode(pParent, "Parent", &pCur); RC_CHECK(); 669 hrc = vdiDisk->COMGETTER(FilePath)(&str); H(); 696 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 697 rc = CFGMR3InsertString(pLunL1, "Driver", "VBoxHDD"); RC_CHECK(); 698 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 699 hrc = vdiDisk->COMGETTER(FilePath)(&str); H(); 670 700 STR_CONV(); 671 rc = CFGMR3InsertString(pC ur, "Path", psz);RC_CHECK();701 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 672 702 STR_FREE(); 673 rc = CFGMR3InsertInteger(pCur, "ReadOnly", 1); RC_CHECK(); 674 675 /* next */ 676 pParent = pCur; 677 parentHardDisk = curHardDisk; 678 } 679 } 680 else if (hddType == HardDiskStorageType_ISCSIHardDisk) 681 { 682 ComPtr<IISCSIHardDisk> iSCSIDisk = hardDisk; 683 AssertBreak (!iSCSIDisk.isNull(), hrc = E_FAIL); 684 685 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 686 rc = CFGMR3InsertString(pLunL1, "Driver", "iSCSI"); RC_CHECK(); 687 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 688 689 /* Set up the iSCSI initiator driver configuration. */ 690 hrc = iSCSIDisk->COMGETTER(Target)(&str); H(); 691 STR_CONV(); 692 rc = CFGMR3InsertString(pCfg, "TargetName", psz); RC_CHECK(); 693 STR_FREE(); 694 695 // @todo currently there is no Initiator name config. 696 rc = CFGMR3InsertString(pCfg, "InitiatorName", "iqn.2006-02.de.innotek.initiator"); RC_CHECK(); 697 698 ULONG64 lun; 699 hrc = iSCSIDisk->COMGETTER(Lun)(&lun); H(); 700 rc = CFGMR3InsertInteger(pCfg, "LUN", lun); RC_CHECK(); 701 702 hrc = iSCSIDisk->COMGETTER(Server)(&str); H(); 703 STR_CONV(); 704 USHORT port; 705 hrc = iSCSIDisk->COMGETTER(Port)(&port); H(); 706 if (port != 0) 707 { 708 char *pszTN; 709 RTStrAPrintf(&pszTN, "%s:%u", psz, port); 710 rc = CFGMR3InsertString(pCfg, "TargetAddress", pszTN); RC_CHECK(); 711 RTStrFree(pszTN); 703 704 /* Create an inversed tree of parents. */ 705 ComPtr<IHardDisk> parentHardDisk = hardDisk; 706 for (PCFGMNODE pParent = pCfg;;) 707 { 708 ComPtr<IHardDisk> curHardDisk; 709 hrc = parentHardDisk->COMGETTER(Parent)(curHardDisk.asOutParam()); H(); 710 if (!curHardDisk) 711 break; 712 713 vdiDisk = curHardDisk; 714 AssertBreak (!vdiDisk.isNull(), hrc = E_FAIL); 715 716 PCFGMNODE pCur; 717 rc = CFGMR3InsertNode(pParent, "Parent", &pCur); RC_CHECK(); 718 hrc = vdiDisk->COMGETTER(FilePath)(&str); H(); 719 STR_CONV(); 720 rc = CFGMR3InsertString(pCur, "Path", psz); RC_CHECK(); 721 STR_FREE(); 722 rc = CFGMR3InsertInteger(pCur, "ReadOnly", 1); RC_CHECK(); 723 724 /* next */ 725 pParent = pCur; 726 parentHardDisk = curHardDisk; 727 } 728 } 729 else if (hddType == HardDiskStorageType_ISCSIHardDisk) 730 { 731 ComPtr<IISCSIHardDisk> iSCSIDisk = hardDisk; 732 AssertBreak (!iSCSIDisk.isNull(), hrc = E_FAIL); 733 734 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 735 rc = CFGMR3InsertString(pLunL1, "Driver", "iSCSI"); RC_CHECK(); 736 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 737 738 /* Set up the iSCSI initiator driver configuration. */ 739 hrc = iSCSIDisk->COMGETTER(Target)(&str); H(); 740 STR_CONV(); 741 rc = CFGMR3InsertString(pCfg, "TargetName", psz); RC_CHECK(); 742 STR_FREE(); 743 744 // @todo currently there is no Initiator name config. 745 rc = CFGMR3InsertString(pCfg, "InitiatorName", "iqn.2006-02.de.innotek.initiator"); RC_CHECK(); 746 747 ULONG64 lun; 748 hrc = iSCSIDisk->COMGETTER(Lun)(&lun); H(); 749 rc = CFGMR3InsertInteger(pCfg, "LUN", lun); RC_CHECK(); 750 751 hrc = iSCSIDisk->COMGETTER(Server)(&str); H(); 752 STR_CONV(); 753 USHORT port; 754 hrc = iSCSIDisk->COMGETTER(Port)(&port); H(); 755 if (port != 0) 756 { 757 char *pszTN; 758 RTStrAPrintf(&pszTN, "%s:%u", psz, port); 759 rc = CFGMR3InsertString(pCfg, "TargetAddress", pszTN); RC_CHECK(); 760 RTStrFree(pszTN); 761 } 762 else 763 { 764 rc = CFGMR3InsertString(pCfg, "TargetAddress", psz); RC_CHECK(); 765 } 766 STR_FREE(); 767 768 hrc = iSCSIDisk->COMGETTER(UserName)(&str); H(); 769 if (str) 770 { 771 STR_CONV(); 772 rc = CFGMR3InsertString(pCfg, "InitiatorUsername", psz); RC_CHECK(); 773 STR_FREE(); 774 } 775 776 hrc = iSCSIDisk->COMGETTER(Password)(&str); H(); 777 if (str) 778 { 779 STR_CONV(); 780 rc = CFGMR3InsertString(pCfg, "InitiatorSecret", psz); RC_CHECK(); 781 STR_FREE(); 782 } 783 784 // @todo currently there is no target username config. 785 //rc = CFGMR3InsertString(pCfg, "TargetUsername", ""); RC_CHECK(); 786 787 // @todo currently there is no target password config. 788 //rc = CFGMR3InsertString(pCfg, "TargetSecret", ""); RC_CHECK(); 789 790 /* The iSCSI initiator needs an attached iSCSI transport driver. */ 791 rc = CFGMR3InsertNode(pLunL1, "AttachedDriver", &pLunL2); RC_CHECK(); 792 rc = CFGMR3InsertString(pLunL2, "Driver", "iSCSITCP"); RC_CHECK(); 793 /* Currently the transport driver has no config options. */ 794 } 795 else if (hddType == HardDiskStorageType_VMDKImage) 796 { 797 ComPtr<IVMDKImage> vmdkDisk = hardDisk; 798 AssertBreak (!vmdkDisk.isNull(), hrc = E_FAIL); 799 800 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 801 #if 1 /* Enable new VD container code (and new VMDK), as the bugs are fixed. */ 802 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); RC_CHECK(); 803 #else 804 rc = CFGMR3InsertString(pLunL1, "Driver", "VmdkHDD"); RC_CHECK(); 805 #endif 806 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 807 hrc = vmdkDisk->COMGETTER(FilePath)(&str); H(); 808 STR_CONV(); 809 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 810 STR_FREE(); 811 rc = CFGMR3InsertString(pCfg, "Format", "VMDK"); RC_CHECK(); 812 } 813 else if (hddType == HardDiskStorageType_CustomHardDisk) 814 { 815 ComPtr<ICustomHardDisk> customHardDisk = hardDisk; 816 AssertBreak (!customHardDisk.isNull(), hrc = E_FAIL); 817 818 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 819 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); RC_CHECK(); 820 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 821 hrc = customHardDisk->COMGETTER(Location)(&str); H(); 822 STR_CONV(); 823 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 824 STR_FREE(); 825 hrc = customHardDisk->COMGETTER(Format)(&str); H(); 826 STR_CONV(); 827 rc = CFGMR3InsertString(pCfg, "Format", psz); RC_CHECK(); 828 STR_FREE(); 829 } 830 else if (hddType == HardDiskStorageType_VHDImage) 831 { 832 ComPtr<IVHDImage> vhdDisk = hardDisk; 833 AssertBreak (!vhdDisk.isNull(), hrc = E_FAIL); 834 835 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 836 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); RC_CHECK(); 837 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 838 hrc = vhdDisk->COMGETTER(FilePath)(&str); H(); 839 STR_CONV(); 840 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 841 rc = CFGMR3InsertString(pCfg, "Format", "VHD"); RC_CHECK(); 842 STR_FREE(); 712 843 } 713 844 else 714 { 715 rc = CFGMR3InsertString(pCfg, "TargetAddress", psz); RC_CHECK(); 716 } 717 STR_FREE(); 718 719 hrc = iSCSIDisk->COMGETTER(UserName)(&str); H(); 720 if (str) 721 { 722 STR_CONV(); 723 rc = CFGMR3InsertString(pCfg, "InitiatorUsername", psz); RC_CHECK(); 724 STR_FREE(); 725 } 726 727 hrc = iSCSIDisk->COMGETTER(Password)(&str); H(); 728 if (str) 729 { 730 STR_CONV(); 731 rc = CFGMR3InsertString(pCfg, "InitiatorSecret", psz); RC_CHECK(); 732 STR_FREE(); 733 } 734 735 // @todo currently there is no target username config. 736 //rc = CFGMR3InsertString(pCfg, "TargetUsername", ""); RC_CHECK(); 737 738 // @todo currently there is no target password config. 739 //rc = CFGMR3InsertString(pCfg, "TargetSecret", ""); RC_CHECK(); 740 741 /* The iSCSI initiator needs an attached iSCSI transport driver. */ 742 rc = CFGMR3InsertNode(pLunL1, "AttachedDriver", &pLunL2); RC_CHECK(); 743 rc = CFGMR3InsertString(pLunL2, "Driver", "iSCSITCP"); RC_CHECK(); 744 /* Currently the transport driver has no config options. */ 745 } 746 else if (hddType == HardDiskStorageType_VMDKImage) 747 { 748 ComPtr<IVMDKImage> vmdkDisk = hardDisk; 749 AssertBreak (!vmdkDisk.isNull(), hrc = E_FAIL); 750 751 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 752 #if 1 /* Enable new VD container code (and new VMDK), as the bugs are fixed. */ 753 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); RC_CHECK(); 754 #else 755 rc = CFGMR3InsertString(pLunL1, "Driver", "VmdkHDD"); RC_CHECK(); 756 #endif 757 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 758 hrc = vmdkDisk->COMGETTER(FilePath)(&str); H(); 759 STR_CONV(); 760 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 761 STR_FREE(); 762 rc = CFGMR3InsertString(pCfg, "Format", "VMDK"); RC_CHECK(); 763 } 764 else if (hddType == HardDiskStorageType_CustomHardDisk) 765 { 766 ComPtr<ICustomHardDisk> customHardDisk = hardDisk; 767 AssertBreak (!customHardDisk.isNull(), hrc = E_FAIL); 768 769 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 770 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); RC_CHECK(); 771 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 772 hrc = customHardDisk->COMGETTER(Location)(&str); H(); 773 STR_CONV(); 774 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 775 STR_FREE(); 776 hrc = customHardDisk->COMGETTER(Format)(&str); H(); 777 STR_CONV(); 778 rc = CFGMR3InsertString(pCfg, "Format", psz); RC_CHECK(); 779 STR_FREE(); 780 } 781 else if (hddType == HardDiskStorageType_VHDImage) 782 { 783 ComPtr<IVHDImage> vhdDisk = hardDisk; 784 AssertBreak (!vhdDisk.isNull(), hrc = E_FAIL); 785 786 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 787 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); RC_CHECK(); 788 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 789 hrc = vhdDisk->COMGETTER(FilePath)(&str); H(); 790 STR_CONV(); 791 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 792 rc = CFGMR3InsertString(pCfg, "Format", "VHD"); RC_CHECK(); 793 STR_FREE(); 794 } 795 else 796 AssertFailed(); 845 AssertFailed(); 846 } 797 847 } 798 848 H(); … … 803 853 { 804 854 // ASSUME: DVD drive is always attached to LUN#2 (i.e. secondary IDE master) 805 rc = CFGMR3InsertNode(pI nst, "LUN#2", &pLunL0);RC_CHECK();855 rc = CFGMR3InsertNode(pIdeInst, "LUN#2", &pLunL0); RC_CHECK(); 806 856 ComPtr<IHostDVDDrive> hostDvdDrive; 807 857 hrc = dvdDrive->GetHostDrive(hostDvdDrive.asOutParam()); H(); … … 1288 1338 ComPtr<IAudioAdapter> audioAdapter; 1289 1339 hrc = pMachine->COMGETTER(AudioAdapter)(audioAdapter.asOutParam()); H(); 1290 BOOL enabled = FALSE;1291 1340 if (audioAdapter) 1292 1341 hrc = audioAdapter->COMGETTER(Enabled)(&enabled); H(); -
trunk/src/VBox/Main/HardDiskAttachmentImpl.cpp
r7207 r7442 28 28 HRESULT HardDiskAttachment::FinalConstruct() 29 29 { 30 mController = DiskControllerType_Null; 31 mDeviceNumber = 0; 30 mBus = StorageBus_Null; 31 mChannel = 0; 32 mDevice = 0; 32 33 33 34 return S_OK; … … 46 47 * 47 48 * @param aHD hard disk object 48 * @param aCtl controller type 49 * @param aDev device number on the controller 49 * @param aBus bus type 50 * @param aChannel channel number 51 * @param aDevice device number on the channel 50 52 * @param aDirty whether the attachment is initially dirty or not 51 53 */ 52 HRESULT HardDiskAttachment::init (HardDisk *aHD, DiskControllerType_T aCtl, LONG aDev,54 HRESULT HardDiskAttachment::init (HardDisk *aHD, StorageBus_T aBus, LONG aChannel, LONG aDevice, 53 55 BOOL aDirty) 54 56 { 55 57 ComAssertRet (aHD, E_INVALIDARG); 58 59 if (aBus == StorageBus_IDE) 60 { 61 if (aChannel < 0 || aChannel > 1) 62 return setError (E_FAIL, 63 tr ("Invalid IDE channel for hard disk '%ls': %d. " 64 "IDE channel number must be in range [0,1]"), 65 aHD->toString().raw(), aChannel); 66 if (aDevice < 0 || aDevice > 1 || (aChannel == 1 && aDevice == 0)) 67 return setError (E_FAIL, 68 tr ("Invalid IDE device slot for hard disk '%ls': %d. " 69 "IDE device slot number must be in range [0,1] for " 70 "channel 0 and always 1 for channel 1"), 71 aHD->toString().raw(), aDevice); 72 } 56 73 57 74 AutoLock alock (this); … … 60 77 61 78 mHardDisk = aHD; 62 mController = aCtl; 63 mDeviceNumber = aDev; 79 mBus = aBus; 80 mChannel = aChannel; 81 mDevice = aDevice; 64 82 65 83 setReady (true); … … 84 102 } 85 103 86 STDMETHODIMP HardDiskAttachment::COMGETTER( Controller) (DiskControllerType_T *aController)104 STDMETHODIMP HardDiskAttachment::COMGETTER(Bus) (StorageBus_T *aBus) 87 105 { 88 if (!a Controller)106 if (!aBus) 89 107 return E_POINTER; 90 108 … … 92 110 CHECK_READY(); 93 111 94 *a Controller = mController;112 *aBus = mBus; 95 113 return S_OK; 96 114 } 97 115 98 STDMETHODIMP HardDiskAttachment::COMGETTER( DeviceNumber) (LONG *aDeviceNumber)116 STDMETHODIMP HardDiskAttachment::COMGETTER(Channel) (LONG *aChannel) 99 117 { 100 if (!a DeviceNumber)118 if (!aChannel) 101 119 return E_INVALIDARG; 102 120 … … 104 122 CHECK_READY(); 105 123 106 *a DeviceNumber = mDeviceNumber;124 *aChannel = mChannel; 107 125 return S_OK; 108 126 } 109 127 128 STDMETHODIMP HardDiskAttachment::COMGETTER(Device) (LONG *aDevice) 129 { 130 if (!aDevice) 131 return E_INVALIDARG; 132 133 AutoLock alock (this); 134 CHECK_READY(); 135 136 *aDevice = mDevice; 137 return S_OK; 138 } 139 -
trunk/src/VBox/Main/MachineImpl.cpp
r7349 r7442 40 40 #include "VirtualBoxErrorInfoImpl.h" 41 41 #include "GuestImpl.h" 42 #include "SATAControllerImpl.h" 42 43 43 44 #include "USBProxyService.h" … … 278 279 while (thatIt != thatAtts.end()) 279 280 { 280 if ((*it)->deviceNumber() == (*thatIt)->deviceNumber() && 281 (*it)->controller() == (*thatIt)->controller() && 281 if ((*it)->bus() == (*thatIt)->bus() && 282 (*it)->channel() == (*thatIt)->channel() && 283 (*it)->device() == (*thatIt)->device() && 282 284 (*it)->hardDisk().equalsTo ((*thatIt)->hardDisk())) 283 285 { … … 1285 1287 } 1286 1288 1289 STDMETHODIMP Machine::COMGETTER(SATAController) (ISATAController **aSATAController) 1290 { 1291 #ifdef VBOX_WITH_AHCI 1292 if (!aSATAController) 1293 return E_POINTER; 1294 1295 AutoCaller autoCaller (this); 1296 CheckComRCReturnRC (autoCaller.rc()); 1297 1298 AutoReaderLock alock (this); 1299 1300 return mSATAController.queryInterfaceTo (aSATAController); 1301 #else 1302 /* Note: The GUI depends on this method returning E_NOTIMPL with no 1303 * extended error info to indicate that SATA is simply not available 1304 * (w/o treting it as a failure), for example, as in OSE */ 1305 return E_NOTIMPL; 1306 #endif 1307 } 1308 1287 1309 STDMETHODIMP Machine::COMGETTER(SettingsFilePath) (BSTR *aFilePath) 1288 1310 { … … 1602 1624 1603 1625 STDMETHODIMP Machine::AttachHardDisk (INPTR GUIDPARAM aId, 1604 DiskControllerType_T aCtl, LONG aDev)1626 StorageBus_T aBus, LONG aChannel, LONG aDevice) 1605 1627 { 1606 1628 Guid id = aId; 1607 1629 1608 if (id.isEmpty() || 1609 aCtl == DiskControllerType_Null || 1610 aDev < 0 || aDev > 1) 1630 if (id.isEmpty() || aBus == StorageBus_Null) 1611 1631 return E_INVALIDARG; 1612 1632 1613 1633 AutoCaller autoCaller (this); 1614 1634 CheckComRCReturnRC (autoCaller.rc()); … … 1635 1655 { 1636 1656 ComObjPtr <HardDiskAttachment> hda = *it; 1637 if (hda-> controller() == aCtl && hda->deviceNumber() == aDev)1657 if (hda->bus() == aBus && hda->channel() == aChannel && hda->device() == aDevice) 1638 1658 { 1639 1659 ComObjPtr <HardDisk> hd = hda->hardDisk(); 1640 1660 AutoLock hdLock (hd); 1641 1661 return setError (E_FAIL, 1642 tr ("Hard disk '%ls' is already attached to device slot %d "1643 " on controller%d"),1644 hd->toString().raw(), aDev , aCtl);1662 tr ("Hard disk '%ls' is already attached to device slot %d on " 1663 "channel %d of bus %d"), 1664 hd->toString().raw(), aDevice, aChannel, aBus); 1645 1665 } 1646 1666 } … … 1649 1669 ComObjPtr <HardDisk> hd; 1650 1670 rc = mParent->getHardDisk (id, hd); 1671 CheckComRCReturnRC (rc); 1672 1673 /* create an attachment object early to let it check argiuments */ 1674 ComObjPtr <HardDiskAttachment> attachment; 1675 attachment.createObject(); 1676 rc = attachment->init (hd, aBus, aChannel, aDevice, false /* aDirty */); 1651 1677 CheckComRCReturnRC (rc); 1652 1678 … … 1712 1738 return setError (E_FAIL, 1713 1739 tr ("Normal/Writethrough hard disk '%ls' is " 1714 "currently attached to device slot %d "1715 "o n controller%d of this machine"),1740 "currently attached to device slot %d on channel %d " 1741 "of bus %d of this machine"), 1716 1742 hd->toString().raw(), 1717 (*it)->deviceNumber(), (*it)->controller()); 1743 (*it)->device(), 1744 (*it)->channel(), (*it)->bus()); 1718 1745 } 1719 1746 } … … 1757 1784 } 1758 1785 1759 ComObjPtr <HardDiskAttachment> attachment; 1760 attachment.createObject(); 1761 attachment->init (hd, aCtl, aDev, dirty); 1786 attachment->setDirty (dirty); 1762 1787 1763 1788 mHDData.backup(); … … 1770 1795 } 1771 1796 1772 STDMETHODIMP Machine::GetHardDisk (DiskControllerType_T aCtl, 1773 LONG aDev, IHardDisk **aHardDisk) 1774 { 1775 if (aCtl == DiskControllerType_Null || 1776 aDev < 0 || aDev > 1) 1797 STDMETHODIMP Machine::GetHardDisk (StorageBus_T aBus, LONG aChannel, 1798 LONG aDevice, IHardDisk **aHardDisk) 1799 { 1800 if (aBus == StorageBus_Null) 1777 1801 return E_INVALIDARG; 1778 1802 1779 1803 AutoCaller autoCaller (this); 1780 1804 CheckComRCReturnRC (autoCaller.rc()); … … 1788 1812 { 1789 1813 ComObjPtr <HardDiskAttachment> hda = *it; 1790 if (hda-> controller() == aCtl && hda->deviceNumber() == aDev)1814 if (hda->bus() == aBus && hda->channel() == aChannel && hda->device() == aDevice) 1791 1815 { 1792 1816 hda->hardDisk().queryInterfaceTo (aHardDisk); … … 1796 1820 1797 1821 return setError (E_INVALIDARG, 1798 tr ("No hard disk attached to device slot %d on controller %d"), 1799 aDev, aCtl); 1800 } 1801 1802 STDMETHODIMP Machine::DetachHardDisk (DiskControllerType_T aCtl, LONG aDev) 1803 { 1804 if (aCtl == DiskControllerType_Null || 1805 aDev < 0 || aDev > 1) 1822 tr ("No hard disk attached to device slot %d on channel %d of bus %d"), 1823 aDevice, aChannel, aBus); 1824 } 1825 1826 STDMETHODIMP Machine::DetachHardDisk (StorageBus_T aBus, LONG aChannel, LONG aDevice) 1827 { 1828 if (aBus == StorageBus_Null) 1806 1829 return E_INVALIDARG; 1807 1830 … … 1824 1847 { 1825 1848 ComObjPtr <HardDiskAttachment> hda = *it; 1826 if (hda-> controller() == aCtl && hda->deviceNumber() == aDev)1849 if (hda->bus() == aBus && hda->channel() == aChannel && hda->device() == aDevice) 1827 1850 { 1828 1851 ComObjPtr <HardDisk> hd = hda->hardDisk(); … … 1889 1912 1890 1913 return setError (E_INVALIDARG, 1891 tr ("No hard disk attached to device slot %d on c ontroller%d"),1892 aDev , aCtl);1914 tr ("No hard disk attached to device slot %d on channel %d of bus %d"), 1915 aDevice, aChannel, aBus); 1893 1916 } 1894 1917 … … 3638 3661 mUSBController->init (this); 3639 3662 3663 /* create the SATA controller object (always present, default is disabled) */ 3664 unconst (mSATAController).createObject(); 3665 mSATAController->init (this); 3666 3640 3667 /* create associated network adapter objects */ 3641 3668 for (ULONG slot = 0; slot < ELEMENTS (mNetworkAdapters); slot ++) … … 3683 3710 mUSBController->uninit(); 3684 3711 unconst (mUSBController).setNull(); 3712 } 3713 3714 if (mSATAController) 3715 { 3716 mSATAController->uninit(); 3717 unconst (mSATAController).setNull(); 3685 3718 } 3686 3719 … … 4282 4315 CheckComRCReturnRC (rc); 4283 4316 4317 /* SATA Controller */ 4318 rc = mSATAController->loadSettings (aNode); 4319 CheckComRCReturnRC (rc); 4320 4284 4321 /* Network node (required) */ 4285 4322 { … … 4460 4497 Guid uuid = (*it).value <Guid> ("hardDisk"); 4461 4498 /* bus (controller) type (required) */ 4462 const char *bus = (*it).stringValue ("bus"); 4499 const char *busStr = (*it).stringValue ("bus"); 4500 /* channel (required) */ 4501 LONG channel = (*it).value <LONG> ("channel"); 4463 4502 /* device (required) */ 4464 const char *device = (*it).stringValue("device");4503 LONG device = (*it).value <LONG> ("device"); 4465 4504 4466 4505 /* find a hard disk by UUID */ … … 4491 4530 4492 4531 /* attach the device */ 4493 DiskControllerType_T ctl = DiskControllerType_Null; 4494 LONG dev = -1; 4495 4496 if (strcmp (bus, "ide0") == 0) 4497 { 4498 ctl = DiskControllerType_IDE0; 4499 if (strcmp (device, "master") == 0) 4500 dev = 0; 4501 else if (strcmp (device, "slave") == 0) 4502 dev = 1; 4503 else 4504 ComAssertMsgFailedRet (("Invalid device '%s'\n", device), 4505 E_FAIL); 4506 } 4507 else if (strcmp (bus, "ide1") == 0) 4508 { 4509 ctl = DiskControllerType_IDE1; 4510 if (strcmp (device, "master") == 0) 4511 rc = setError (E_FAIL, tr("Could not attach a disk as a master " 4512 "device on the secondary controller")); 4513 else if (strcmp (device, "slave") == 0) 4514 dev = 1; 4515 else 4516 ComAssertMsgFailedRet (("Invalid device '%s'\n", device), 4517 E_FAIL); 4532 StorageBus_T bus = StorageBus_Null; 4533 4534 if (strcmp (busStr, "IDE") == 0) 4535 { 4536 bus = StorageBus_IDE; 4537 } 4538 else if (strcmp (busStr, "SATA") == 0) 4539 { 4540 bus = StorageBus_SATA; 4518 4541 } 4519 4542 else … … 4523 4546 ComObjPtr <HardDiskAttachment> attachment; 4524 4547 attachment.createObject(); 4525 rc = attachment->init (hd, ctl, dev, false /* aDirty */);4548 rc = attachment->init (hd, bus, channel, device, false /* aDirty */); 4526 4549 CheckComRCBreakRC (rc); 4527 4550 … … 4536 4559 } 4537 4560 4538 return S_OK;4561 return rc; 4539 4562 } 4540 4563 … … 5659 5682 CheckComRCReturnRC (rc); 5660 5683 5684 /* SATA Controller (required) */ 5685 rc = mSATAController->saveSettings (aNode); 5686 CheckComRCReturnRC (rc); 5687 5661 5688 /* Network adapters (required) */ 5662 5689 { … … 5793 5820 { 5794 5821 const char *bus = NULL; 5795 switch (att-> controller())5822 switch (att->bus()) 5796 5823 { 5797 case DiskControllerType_IDE0: bus = "ide0"; break;5798 case DiskControllerType_IDE1: bus = "ide1"; break;5824 case StorageBus_IDE: bus = "IDE"; break; 5825 case StorageBus_SATA: bus = "SATA"; break; 5799 5826 default: 5800 5827 ComAssertFailedRet (E_FAIL); 5801 5828 } 5802 5829 5803 const char *dev = NULL;5804 switch (att->deviceNumber())5805 {5806 case 0: dev = "master"; break;5807 case 1: dev = "slave"; break;5808 default:5809 ComAssertFailedRet (E_FAIL);5810 }5811 5812 5830 hdNode.setValue <Guid> ("hardDisk", att->hardDisk()->id()); 5813 5831 hdNode.setStringValue ("bus", bus); 5814 hdNode.setStringValue ("device", dev); 5832 hdNode.setValue <LONG> ("channel", att->channel()); 5833 hdNode.setValue <LONG> ("device", att->device()); 5815 5834 } 5816 5835 } … … 6073 6092 * be used 6074 6093 */ 6075 if ((*it)->deviceNumber() == hda->deviceNumber() && 6076 (*it)->controller() == hda->controller()) 6094 if ((*it)->device() == hda->device() && 6095 (*it)->channel() == hda->channel() && 6096 (*it)->bus() == hda->bus()) 6077 6097 { 6078 6098 foundIt = it; … … 6095 6115 ++ it2) 6096 6116 { 6097 if ((*it2)->deviceNumber() == (*it)->deviceNumber() && 6098 (*it2)->controller() == (*it)->controller() && 6117 if ((*it2)->device() == (*it)->device() && 6118 (*it2)->channel() == (*it)->channel() && 6119 (*it2)->bus() == (*it)->bus() && 6099 6120 (*it2)->hardDisk()->root().equalsTo (hd)) 6100 6121 { … … 6165 6186 * be used 6166 6187 */ 6167 if ((*it)->deviceNumber() == hda->deviceNumber() && 6168 (*it)->controller() == hda->controller()) 6188 if ((*it)->device() == hda->device() && 6189 (*it)->channel() == hda->channel() && 6190 (*it)->bus() == hda->bus()) 6169 6191 { 6170 6192 foundIt = it; … … 6482 6504 ComObjPtr <HardDiskAttachment> newHda; 6483 6505 newHda.createObject(); 6484 rc = newHda->init (newHd, hda-> controller(), hda->deviceNumber(),6506 rc = newHda->init (newHd, hda->bus(), hda->channel(), hda->device(), 6485 6507 false /* aDirty */); 6486 6508 … … 6704 6726 (mAudioAdapter && mAudioAdapter->isModified()) || 6705 6727 (mUSBController && mUSBController->isModified()) || 6728 (mSATAController && mSATAController->isModified()) || 6706 6729 (mBIOSSettings && mBIOSSettings->isModified()); 6707 6730 } … … 6746 6769 (mAudioAdapter && mAudioAdapter->isReallyModified()) || 6747 6770 (mUSBController && mUSBController->isReallyModified()) || 6771 (mSATAController && mSATAController->isReallyModified()) || 6748 6772 (mBIOSSettings && mBIOSSettings->isReallyModified()); 6749 6773 } … … 6805 6829 6806 6830 bool vrdpChanged = false, dvdChanged = false, floppyChanged = false, 6807 usbChanged = false ;6831 usbChanged = false, sataChanged = false; 6808 6832 6809 6833 ComPtr <INetworkAdapter> networkAdapters [ELEMENTS (mNetworkAdapters)]; … … 6830 6854 if (mUSBController) 6831 6855 usbChanged = mUSBController->rollback(); 6856 6857 if (mSATAController) 6858 sataChanged = mSATAController->rollback(); 6832 6859 6833 6860 for (ULONG slot = 0; slot < ELEMENTS (mNetworkAdapters); slot ++) … … 6864 6891 if (usbChanged) 6865 6892 that->onUSBControllerChange(); 6893 if (sataChanged) 6894 that->onSATAControllerChange(); 6866 6895 6867 6896 for (ULONG slot = 0; slot < ELEMENTS (networkAdapters); slot ++) … … 6917 6946 mAudioAdapter->commit(); 6918 6947 mUSBController->commit(); 6948 mSATAController->commit(); 6919 6949 6920 6950 for (ULONG slot = 0; slot < ELEMENTS (mNetworkAdapters); slot ++) … … 6982 7012 mAudioAdapter->copyFrom (aThat->mAudioAdapter); 6983 7013 mUSBController->copyFrom (aThat->mUSBController); 7014 mSATAController->copyFrom (aThat->mSATAController); 6984 7015 6985 7016 for (ULONG slot = 0; slot < ELEMENTS (mNetworkAdapters); slot ++) … … 7184 7215 unconst (mUSBController).createObject(); 7185 7216 mUSBController->init (this, aMachine->mUSBController); 7217 /* create another SATA controller object that will be mutable */ 7218 unconst (mSATAController).createObject(); 7219 mSATAController->init (this, aMachine->mSATAController); 7186 7220 /* create a list of network adapters that will be mutable */ 7187 7221 for (ULONG slot = 0; slot < ELEMENTS (mNetworkAdapters); slot ++) … … 9783 9817 mUSBController->initCopy (this, mPeer->mUSBController); 9784 9818 9819 unconst (mSATAController).createObject(); 9820 mSATAController->initCopy (this, mPeer->mSATAController); 9821 9785 9822 for (ULONG slot = 0; slot < ELEMENTS (mNetworkAdapters); slot ++) 9786 9823 { … … 9882 9919 mUSBController->init (this); 9883 9920 9921 unconst (mSATAController).createObject(); 9922 mSATAController->init (this); 9923 9884 9924 for (ULONG slot = 0; slot < ELEMENTS (mNetworkAdapters); slot ++) 9885 9925 { -
trunk/src/VBox/Main/Makefile.kmk
r7309 r7442 137 137 ifdef VBOX_WITH_E1000 138 138 VBoxSVC_DEFS += VBOX_WITH_E1000 139 endif 140 ifdef VBOX_WITH_AHCI 141 VBoxSVC_DEFS += VBOX_WITH_AHCI 139 142 endif 140 143 ifdef VBOX_WITHOUT_LINUX_COMPILER_H … … 195 198 ParallelPortImpl.cpp \ 196 199 USBControllerImpl.cpp \ 200 SATAControllerImpl.cpp \ 197 201 AudioAdapterImpl.cpp \ 198 202 SharedFolderImpl.cpp \ -
trunk/src/VBox/Main/VirtualBoxImplExtra.cpp
r7387 r7442 31 31 #include "xml_SettingsConverter_xsl.h" 32 32 33 static const unsigned char g_ab_xml_VirtualBox_settings_root_xsd[] = 34 "<xsd:schema" 35 " xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"" 36 " xmlns=\"http://www.innotek.de/VirtualBox-settings\"" 37 " xmlns:vb=\"http://www.innotek.de/VirtualBox-settings\"" 38 " targetNamespace=\"http://www.innotek.de/VirtualBox-settings\"" 39 " elementFormDefault=\"qualified\"" 40 ">" 41 "<xsd:element name=\"VirtualBox\">" 42 " <xsd:complexType>" 43 " <xsd:complexContent>" 44 " <xsd:extension base=\"TVirtualBox\">" 45 " <xsd:attribute name=\"version\" type=\"xsd:token\" fixed=\"" VBOX_XML_VERSION_FULL "\" use=\"required\"/>" 46 " </xsd:extension>" 47 " </xsd:complexContent>" 48 " </xsd:complexType>" 49 "</xsd:element>" 50 "</xsd:schema>"; 51 52 static const unsigned g_cb_xml_VirtualBox_settings_root_xsd = 53 sizeof (g_ab_xml_VirtualBox_settings_root_xsd); 54 33 55 /** 34 56 * Resolves external entities while parting and validating XML settings files. … … 48 70 MemoryBuf ((const char *) g_ab_xml_VirtualBox_settings_common_xsd, 49 71 g_cb_xml_VirtualBox_settings_common_xsd, aURI); 72 } 73 74 if (strcmp (aURI, VBOX_XML_SCHEMA_ROOT) == 0) 75 { 76 return new settings:: 77 MemoryBuf ((const char *) g_ab_xml_VirtualBox_settings_root_xsd, 78 g_cb_xml_VirtualBox_settings_root_xsd, aURI); 50 79 } 51 80 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r7434 r7442 385 385 386 386 <enum 387 name=" DiskControllerType"388 uuid=" 1115b810-2ee7-4ebd-8b39-92e98c9a2b48"387 name="StorageBus" 388 uuid="715984a5-093c-43bb-aa42-a16ed16828dd" 389 389 > 390 <desc> 391 Disk controller type for hard disk attachments. 392 </desc> 390 <desc>Interface bus type for storage devices.</desc> 393 391 394 392 <const name="Null" value="0"> 395 393 <desc><tt>null</tt> value. Never used by the API.</desc> 396 394 </const> 397 <const name="IDE0" value="1"/> 398 <const name="IDE1" value="2"/> 395 396 <const name="IDE" value="1"/> 397 <const name="SATA" value="2"/> 399 398 </enum> 400 399 … … 2772 2771 </attribute> 2773 2772 2773 <attribute name="SATAController" type="ISATAController" readonly="yes"> 2774 <desc> 2775 Associated SATA controller object. 2776 </desc> 2777 </attribute> 2778 2774 2779 <attribute name="settingsFilePath" type="wstring" readonly="yes"> 2775 2780 <desc> … … 3029 3034 3030 3035 Attaches a virtual hard disk identified by the given UUID to the 3031 given device slot of the given c ontroller. The specified device3032 must not have another disk attached and the given hard disk must3033 not be already attached to this machine.3036 given device slot of the given channel on the given bus. The 3037 specified device slot must not have another disk attached and the 3038 given hard disk must not be already attached to this machine. 3034 3039 3035 3040 See <link to="IHardDisk"/> for detailed information about … … 3046 3051 3047 3052 </desc> 3048 <param name=" diskID" type="uuid" dir="in">3053 <param name="id" type="uuid" dir="in"> 3049 3054 <desc>UUID of the hard disk to attach.</desc> 3050 3055 </param> 3051 <param name=" controller" type="DiskControllerType" dir="in">3056 <param name="bus" type="StorageBus" dir="in"> 3052 3057 <desc>Controller to attach the hard disk to.</desc> 3058 </param> 3059 <param name="channel" type="long" dir="in"> 3060 <desc>Device slot to attach the hard disk to.</desc> 3053 3061 </param> 3054 3062 <param name="device" type="long" dir="in"> … … 3062 3070 given controller under the specified device number. 3063 3071 </desc> 3064 <param name="controller" type="DiskControllerType" dir="in"/> 3065 <param name="deviceNumber" type="long" dir="in"/> 3072 <param name="bus" type="StorageBus" dir="in"/> 3073 <param name="channel" type="long" dir="in"/> 3074 <param name="device" type="long" dir="in"/> 3066 3075 <param name="hardDisk" type="IHardDisk" dir="return"/> 3067 3076 </method> … … 3090 3099 3091 3100 </desc> 3092 <param name="controller" type="DiskControllerType" dir="in"> 3093 <desc>Controller to dettach the hard disk from.</desc> 3101 <param name="bus" type="StorageBus" dir="in"> 3102 <desc>Bus to dettach the hard disk from.</desc> 3103 </param> 3104 <param name="channel" type="long" dir="in"> 3105 <desc>Channel number to dettach the hard disk from.</desc> 3094 3106 </param> 3095 3107 <param name="device" type="long" dir="in"> 3096 <desc>Device slot to dettach the hard disk from.</desc>3108 <desc>Device slot number to dettach the hard disk from.</desc> 3097 3109 </param> 3098 3110 </method> … … 5711 5723 </attribute> 5712 5724 5713 <attribute name=" controller" type="DiskControllerType" readonly="yes">5725 <attribute name="bus" type="StorageBus" readonly="yes"> 5714 5726 <desc>Disk controller ID of this attachment.</desc> 5715 5727 </attribute> 5716 5728 5717 <attribute name="deviceNumber" type="long" readonly="yes"> 5718 <desc>Device number of the attachment.</desc> 5729 <attribute name="channel" type="long" readonly="yes"> 5730 <desc>Channel number of the attachment.</desc> 5731 </attribute> 5732 5733 <attribute name="device" type="long" readonly="yes"> 5734 <desc>Device slot number of the attachment.</desc> 5719 5735 </attribute> 5720 5736 … … 9739 9755 </interface> 9740 9756 9757 <!-- 9758 // ISATAController 9759 ///////////////////////////////////////////////////////////////////////// 9760 --> 9761 9762 <interface 9763 name="ISATAController" extends="$unknown" 9764 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff" 9765 wsmap="managed" 9766 > 9767 <attribute name="enabled" type="boolean"> 9768 <desc> 9769 Flag whether the SATA controller is present in the 9770 guest system. If disabled, the virtual guest hardware will 9771 not contain any SATA controller. Can only be changed when 9772 the VM is powered off. 9773 </desc> 9774 </attribute> 9775 9776 <method name="GetIDEEmulationPort"> 9777 <desc>Gets the corresponding port number which is emulated as an IDE device.</desc> 9778 <param name="devicePosition" type="long" dir="in"/> 9779 <param name="portNumber" type="long" dir="return"/> 9780 </method> 9781 9782 <method name="SetIDEEmulationPort"> 9783 <desc>Sets the port number which is emulated as an IDE device.</desc> 9784 <param name="devicePosition" type="long" dir="in"/> 9785 <param name="portNumber" type="long" dir="in"/> 9786 </method> 9787 9788 </interface> 9789 9741 9790 <if target="wsdl"> 9742 9791 -
trunk/src/VBox/Main/include/HardDiskAttachmentImpl.h
r5999 r7442 49 49 50 50 // public initializer/uninitializer for internal purposes only 51 HRESULT init (HardDisk *aHD, DiskControllerType_T aCtl, LONG aDev, BOOL aDirty);51 HRESULT init (HardDisk *aHD, StorageBus_T aBus, LONG aChannel, LONG aDevice, BOOL aDirty); 52 52 53 53 // IHardDiskAttachment properties 54 STDMETHOD(COMGETTER(HardDisk)) (IHardDisk **aHardDisk); 55 STDMETHOD(COMGETTER(Controller)) (DiskControllerType_T *aController); 56 STDMETHOD(COMGETTER(DeviceNumber)) (LONG *aDeviceNumber); 54 STDMETHOD(COMGETTER(HardDisk)) (IHardDisk **aHardDisk); 55 STDMETHOD(COMGETTER(Bus)) (StorageBus_T *aBus); 56 STDMETHOD(COMGETTER(Channel)) (LONG *aChannel); 57 STDMETHOD(COMGETTER(Device)) (LONG *aDevice); 57 58 58 59 // public methods for internal purposes only 60 // (ensure there is a caller and a read or write lock before calling them!) 59 61 60 62 BOOL isDirty() const { return mDirty; } 63 void setDirty (BOOL aDirty) { mDirty = aDirty; } 61 64 62 65 const ComObjPtr <HardDisk> &hardDisk() const { return mHardDisk; } 63 DiskControllerType_T controller() const { return mController; } 64 LONG deviceNumber() const { return mDeviceNumber; } 66 StorageBus_T bus() const { return mBus; } 67 LONG channel() const { return mChannel; } 68 LONG device() const { return mDevice; } 65 69 66 /** @note Don't forget to lock this object! */67 70 void updateHardDisk (const ComObjPtr <HardDisk> &aHardDisk, BOOL aDirty) 68 71 { … … 78 81 BOOL mDirty; 79 82 ComObjPtr <HardDisk> mHardDisk; 80 DiskControllerType_T mController; 81 LONG mDeviceNumber; 83 StorageBus_T mBus; 84 LONG mChannel; 85 LONG mDevice; 82 86 }; 83 87 -
trunk/src/VBox/Main/include/MachineImpl.h
r7349 r7442 34 34 #include "ParallelPortImpl.h" 35 35 #include "BIOSSettingsImpl.h" 36 #include "SATAControllerImpl.h" 36 37 37 38 // generated header … … 466 467 STDMETHOD(COMGETTER(AudioAdapter))(IAudioAdapter **audioAdapter); 467 468 STDMETHOD(COMGETTER(USBController)) (IUSBController * *aUSBController); 469 STDMETHOD(COMGETTER(SATAController)) (ISATAController **aSATAController); 468 470 STDMETHOD(COMGETTER(SettingsFilePath)) (BSTR *aFilePath); 469 471 STDMETHOD(COMGETTER(SettingsFileVersion)) (BSTR *aSettingsFileVersion); … … 486 488 STDMETHOD(SetBootOrder)(ULONG aPosition, DeviceType_T aDevice); 487 489 STDMETHOD(GetBootOrder)(ULONG aPosition, DeviceType_T *aDevice); 488 STDMETHOD(AttachHardDisk)(INPTR GUIDPARAM aId, DiskControllerType_T aCtl, LONG aDev);489 STDMETHOD(GetHardDisk)( DiskControllerType_T aCtl, LONG aDev, IHardDisk **aHardDisk);490 STDMETHOD(DetachHardDisk) ( DiskControllerType_T aCtl, LONG aDev);490 STDMETHOD(AttachHardDisk)(INPTR GUIDPARAM aId, StorageBus_T aBus, LONG aChannel, LONG aDevice); 491 STDMETHOD(GetHardDisk)(StorageBus_T aBus, LONG aChannel, LONG aDevice, IHardDisk **aHardDisk); 492 STDMETHOD(DetachHardDisk) (StorageBus_T aBus, LONG aChannel, LONG aDevice); 491 493 STDMETHOD(GetSerialPort) (ULONG slot, ISerialPort **port); 492 494 STDMETHOD(GetParallelPort) (ULONG slot, IParallelPort **port); … … 560 562 virtual HRESULT onVRDPServerChange() { return S_OK; } 561 563 virtual HRESULT onUSBControllerChange() { return S_OK; } 564 virtual HRESULT onSATAControllerChange() { return S_OK; } 562 565 virtual HRESULT onSharedFolderChange() { return S_OK; } 563 566 … … 719 722 const ComObjPtr <AudioAdapter> mAudioAdapter; 720 723 const ComObjPtr <USBController> mUSBController; 724 const ComObjPtr <SATAController> mSATAController; 721 725 const ComObjPtr <BIOSSettings> mBIOSSettings; 722 726 const ComObjPtr <NetworkAdapter> -
trunk/src/VBox/Main/include/VirtualBoxXMLUtil.h
r7341 r7442 25 25 26 26 /** VirtualBox XML settings version number substring ("x.y") */ 27 #define VBOX_XML_VERSION "1.2"27 #define VBOX_XML_VERSION "1.3.pre" 28 28 29 29 /** VirtualBox XML settings version platform substring */ … … 51 51 #define VBOX_XML_VERSION_FULL VBOX_XML_VERSION "-" VBOX_XML_PLATFORM 52 52 53 /** VirtualBox XML common settings version string */ 54 #define VBOX_XML_PLATFORM_COMMON "common" 55 56 /** VirtualBox XML settings schema file */ 53 /** VirtualBox XML settings platform-specific (main) schema file */ 57 54 #define VBOX_XML_SCHEMA "VirtualBox-settings-" VBOX_XML_PLATFORM ".xsd" 58 #define VBOX_XML_SCHEMA_COMMON "VirtualBox-settings-" VBOX_XML_PLATFORM_COMMON ".xsd" 55 /** VirtualBox XML settings common schema include file */ 56 #define VBOX_XML_SCHEMA_COMMON "VirtualBox-settings-common.xsd" 57 /** VirtualBox XML settings root element schema include file */ 58 #define VBOX_XML_SCHEMA_ROOT "VirtualBox-settings-root.xsd" 59 59 60 60 /** VirtualBox XML settings converter file */ -
trunk/src/VBox/Main/linux/server.cpp
r6828 r7442 97 97 #include <USBControllerImpl.h> 98 98 #include <USBDeviceImpl.h> 99 #include <SATAControllerImpl.h> 99 100 #include <AudioAdapterImpl.h> 100 101 #include <SystemPropertiesImpl.h> … … 160 161 NS_DECL_CLASSINFO(USBController) 161 162 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(USBController, IUSBController) 163 NS_DECL_CLASSINFO(SATAController) 164 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(SATAController, ISATAController) 162 165 NS_DECL_CLASSINFO(USBDeviceFilter) 163 166 NS_IMPL_THREADSAFE_ISUPPORTS1_CI(USBDeviceFilter, IUSBDeviceFilter) -
trunk/src/VBox/Main/testcase/tstVBoxAPILinux.cpp
r7207 r7442 366 366 hardDisk->GetId(&vdiUUID); 367 367 rc = machine->AttachHardDisk(*vdiUUID, 368 DiskControllerType::IDE0, // controler identifier 369 0); // device number on the controller 368 StorageBus::IDE, // controler identifier 369 0, // channel number on the controller 370 0); // device number on the controller 370 371 nsMemory::Free(vdiUUID); 371 372 if (NS_FAILED(rc)) -
trunk/src/VBox/Main/xml/SchemaDefs.xsl
r6597 r7442 92 92 <!-- process include statements --> 93 93 <xsl:for-each select="xsd:include"> 94 <xsl:apply-templates select="document(@schemaLocation)/xsd:schema"/> 94 <!-- skip VirtualBox-settings-root.xsd inclusion as it is computed at runtime --> 95 <xsl:if test="not(@schemaLocation='VirtualBox-settings-root.xsd')"> 96 <xsl:apply-templates select="document(@schemaLocation)/xsd:schema"/> 97 </xsl:if> 95 98 </xsl:for-each> 96 99 97 100 <xsl:call-template name="defineEnumMember"> 98 99 100 101 101 <xsl:with-param name="member" select="' MinGuestRAM'"/> 102 <xsl:with-param name="select" select=" 103 xsd:complexType[@name='TMemory']/xsd:attribute[@name='RAMSize']//xsd:minInclusive/@value 104 "/> 102 105 </xsl:call-template> 103 106 <xsl:call-template name="defineEnumMember"> 104 105 106 107 107 <xsl:with-param name="member" select="' MaxGuestRAM'"/> 108 <xsl:with-param name="select" select=" 109 xsd:complexType[@name='TMemory']/xsd:attribute[@name='RAMSize']//xsd:maxInclusive/@value 110 "/> 108 111 </xsl:call-template> 109 112 110 113 <xsl:call-template name="defineEnumMember"> 111 112 113 114 114 <xsl:with-param name="member" select="' MinGuestVRAM'"/> 115 <xsl:with-param name="select" select=" 116 xsd:complexType[@name='TDisplay']/xsd:attribute[@name='VRAMSize']//xsd:minInclusive/@value 117 "/> 115 118 </xsl:call-template> 116 119 <xsl:call-template name="defineEnumMember"> 117 118 119 120 120 <xsl:with-param name="member" select="' MaxGuestVRAM'"/> 121 <xsl:with-param name="select" select=" 122 xsd:complexType[@name='TDisplay']/xsd:attribute[@name='VRAMSize']//xsd:maxInclusive/@value 123 "/> 121 124 </xsl:call-template> 122 125 <xsl:call-template name="defineEnumMember"> 123 124 125 126 126 <xsl:with-param name="member" select="' MaxGuestMonitors'"/> 127 <xsl:with-param name="select" select=" 128 xsd:complexType[@name='TDisplay']/xsd:attribute[@name='MonitorCount']//xsd:maxInclusive/@value 129 "/> 127 130 </xsl:call-template> 128 131 <xsl:call-template name="defineEnumMember"> 129 130 131 132 132 <xsl:with-param name="member" select="' NetworkAdapterCount'"/> 133 <xsl:with-param name="select" select=" 134 xsd:complexType[@name='TNetworkAdapter']/xsd:attribute[@name='slot']//xsd:maxExclusive/@value 135 "/> 133 136 </xsl:call-template> 134 137 <xsl:call-template name="defineEnumMember"> 135 136 137 138 138 <xsl:with-param name="member" select="' SerialPortCount'"/> 139 <xsl:with-param name="select" select=" 140 xsd:complexType[@name='TUartPort']/xsd:attribute[@name='slot']//xsd:maxExclusive/@value 141 "/> 139 142 </xsl:call-template> 140 143 <xsl:call-template name="defineEnumMember"> 141 142 143 144 144 <xsl:with-param name="member" select="' ParallelPortCount'"/> 145 <xsl:with-param name="select" select=" 146 xsd:complexType[@name='TLptPort']/xsd:attribute[@name='slot']//xsd:maxExclusive/@value 147 "/> 145 148 </xsl:call-template> 146 149 <xsl:call-template name="defineEnumMember"> 147 148 149 150 150 <xsl:with-param name="member" select="' MaxBootPosition'"/> 151 <xsl:with-param name="select" select=" 152 xsd:complexType[@name='TBoot']//xsd:element[@name='Order']//xsd:attribute[@name='position']//xsd:maxInclusive/@value 153 "/> 151 154 </xsl:call-template> 152 155 -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r7218 r7442 498 498 <xsd:simpleType> 499 499 <xsd:restriction base="xsd:token"> 500 <xsd:enumeration value="ide0"/> 501 <xsd:enumeration value="ide1"/> 502 </xsd:restriction> 503 </xsd:simpleType> 504 </xsd:attribute> 505 <xsd:attribute name="device" use="required"> 506 <xsd:simpleType> 507 <xsd:restriction base="xsd:token"> 508 <xsd:enumeration value="master"/> 509 <xsd:enumeration value="slave"/> 510 </xsd:restriction> 511 </xsd:simpleType> 512 </xsd:attribute> 500 <xsd:enumeration value="IDE"/> 501 <xsd:enumeration value="SATA"/> 502 </xsd:restriction> 503 </xsd:simpleType> 504 </xsd:attribute> 505 <xsd:attribute name="channel" type="xsd:unsignedInt" use="required"/> 506 <xsd:attribute name="device" type="xsd:unsignedInt" default="0"/> 513 507 </xsd:complexType> 514 508 … … 658 652 <xsd:attribute name="MemoryBalloonSize" type="xsd:unsignedInt" default="0"/> 659 653 <xsd:attribute name="StatisticsUpdateInterval" type="xsd:unsignedInt" default="0"/> 654 </xsd:complexType> 655 656 <xsd:complexType name="TSATAController"> 657 <xsd:attribute name="enabled" type="xsd:boolean" use="required"/> 658 <xsd:attribute name="IDE0MasterEmulationPort" type="xsd:unsignedInt" default="0"/> 659 <xsd:attribute name="IDE0SlaveEmulationPort" type="xsd:unsignedInt" default="1"/> 660 <xsd:attribute name="IDE1MasterEmulationPort" type="xsd:unsignedInt" default="2"/> 661 <xsd:attribute name="IDE1SlaveEmulationPort" type="xsd:unsignedInt" default="3"/> 660 662 </xsd:complexType> 661 663 … … 676 678 <xsd:element name="FloppyDrive" type="TFloppyDrive"/> 677 679 <xsd:element name="USBController" type="TUSBController"/> 680 <xsd:element name="SATAController" type="TSATAController"/> 678 681 <xsd:element name="Network" type="TNetwork"> 679 682 <xsd:unique name="THardware-Network-Adapter"> -
trunk/src/VBox/Main/xml/VirtualBox-settings-freebsd.xsd
r6606 r7442 27 27 <xsd:annotation> 28 28 <xsd:documentation xml:lang="en"> 29 innotek VirtualBox Settings Schema Version 1.0-freebsd.30 Copyright (c) 2004-200 7innotek GmbH.29 innotek VirtualBox Settings Schema (freebsd). 30 Copyright (c) 2004-2008 innotek GmbH. 31 31 </xsd:documentation> 32 32 </xsd:annotation> 33 33 34 34 <xsd:include schemaLocation="VirtualBox-settings-common.xsd"/> 35 36 <!-- 37 this includes a computed VirtualBox element definition that contains 38 a proper 'version' attribute constraint (e.g. recent verison number 39 and platform suffix) 40 --> 41 <xsd:include schemaLocation="VirtualBox-settings-root.xsd"/> 35 42 36 43 <!-- … … 102 109 </xsd:complexType> 103 110 104 <!--105 // Root element106 /////////////////////////////////////////////////////////////////////////107 -->108 109 <xsd:element name="VirtualBox">110 <xsd:complexType>111 <xsd:complexContent>112 <xsd:extension base="TVirtualBox">113 <xsd:attribute name="version" type="xsd:token" fixed="1.2-freebsd" use="required"/>114 </xsd:extension>115 </xsd:complexContent>116 </xsd:complexType>117 </xsd:element>118 119 111 </xsd:schema> -
trunk/src/VBox/Main/xml/VirtualBox-settings-linux.xsd
r6597 r7442 27 27 <xsd:annotation> 28 28 <xsd:documentation xml:lang="en"> 29 innotek VirtualBox Settings Schema Version 1.0-linux.30 Copyright (c) 2004-200 7innotek GmbH.29 innotek VirtualBox Settings Schema (linux). 30 Copyright (c) 2004-2008 innotek GmbH. 31 31 </xsd:documentation> 32 32 </xsd:annotation> 33 33 34 34 <xsd:include schemaLocation="VirtualBox-settings-common.xsd"/> 35 36 <!-- 37 this includes a computed VirtualBox element definition that contains 38 a proper 'version' attribute constraint (e.g. recent verison number 39 and platform suffix) 40 --> 41 <xsd:include schemaLocation="VirtualBox-settings-root.xsd"/> 35 42 36 43 <!-- … … 103 110 </xsd:complexType> 104 111 105 <!--106 // Root element107 /////////////////////////////////////////////////////////////////////////108 -->109 110 <xsd:element name="VirtualBox">111 <xsd:complexType>112 <xsd:complexContent>113 <xsd:extension base="TVirtualBox">114 <xsd:attribute name="version" type="xsd:token" fixed="1.2-linux" use="required"/>115 </xsd:extension>116 </xsd:complexContent>117 </xsd:complexType>118 </xsd:element>119 120 112 </xsd:schema> -
trunk/src/VBox/Main/xml/VirtualBox-settings-macosx.xsd
r6606 r7442 27 27 <xsd:annotation> 28 28 <xsd:documentation xml:lang="en"> 29 innotek VirtualBox Settings Schema Version 1.0-macosx.30 Copyright (c) 2004-200 7innotek GmbH.29 innotek VirtualBox Settings Schema (macosx). 30 Copyright (c) 2004-2008 innotek GmbH. 31 31 </xsd:documentation> 32 32 </xsd:annotation> 33 33 34 34 <xsd:include schemaLocation="VirtualBox-settings-common.xsd"/> 35 36 <!-- 37 this includes a computed VirtualBox element definition that contains 38 a proper 'version' attribute constraint (e.g. recent verison number 39 and platform suffix) 40 --> 41 <xsd:include schemaLocation="VirtualBox-settings-root.xsd"/> 35 42 36 43 <!-- … … 101 108 </xsd:complexType> 102 109 103 <!--104 // Root element105 /////////////////////////////////////////////////////////////////////////106 -->107 108 <xsd:element name="VirtualBox">109 <xsd:complexType>110 <xsd:complexContent>111 <xsd:extension base="TVirtualBox">112 <xsd:attribute name="version" type="xsd:token" fixed="1.2-macosx" use="required"/>113 </xsd:extension>114 </xsd:complexContent>115 </xsd:complexType>116 </xsd:element>117 118 110 </xsd:schema> -
trunk/src/VBox/Main/xml/VirtualBox-settings-os2.xsd
r6606 r7442 27 27 <xsd:annotation> 28 28 <xsd:documentation xml:lang="en"> 29 innotek VirtualBox Settings Schema Version 1.0-os2.30 Copyright (c) 2004-200 7innotek GmbH.29 innotek VirtualBox Settings Schema (os2). 30 Copyright (c) 2004-2008 innotek GmbH. 31 31 </xsd:documentation> 32 32 </xsd:annotation> 33 33 34 34 <xsd:include schemaLocation="VirtualBox-settings-common.xsd"/> 35 36 <!-- 37 this includes a computed VirtualBox element definition that contains 38 a proper 'version' attribute constraint (e.g. recent verison number 39 and platform suffix) 40 --> 41 <xsd:include schemaLocation="VirtualBox-settings-root.xsd"/> 35 42 36 43 <!-- … … 101 108 </xsd:complexType> 102 109 103 <!--104 // Root element105 /////////////////////////////////////////////////////////////////////////106 -->107 108 <xsd:element name="VirtualBox">109 <xsd:complexType>110 <xsd:complexContent>111 <xsd:extension base="TVirtualBox">112 <xsd:attribute name="version" type="xsd:token" fixed="1.2-os2" use="required"/>113 </xsd:extension>114 </xsd:complexContent>115 </xsd:complexType>116 </xsd:element>117 118 110 </xsd:schema> -
trunk/src/VBox/Main/xml/VirtualBox-settings-solaris.xsd
r6606 r7442 27 27 <xsd:annotation> 28 28 <xsd:documentation xml:lang="en"> 29 innotek VirtualBox Settings Schema Version 1.0-solaris.30 Copyright (c) 2004-200 7innotek GmbH.29 innotek VirtualBox Settings Schema (solaris). 30 Copyright (c) 2004-2008 innotek GmbH. 31 31 </xsd:documentation> 32 32 </xsd:annotation> 33 33 34 34 <xsd:include schemaLocation="VirtualBox-settings-common.xsd"/> 35 36 <!-- 37 this includes a computed VirtualBox element definition that contains 38 a proper 'version' attribute constraint (e.g. recent verison number 39 and platform suffix) 40 --> 41 <xsd:include schemaLocation="VirtualBox-settings-root.xsd"/> 35 42 36 43 <!-- … … 101 108 </xsd:complexType> 102 109 103 <!--104 // Root element105 /////////////////////////////////////////////////////////////////////////106 -->107 108 <xsd:element name="VirtualBox">109 <xsd:complexType>110 <xsd:complexContent>111 <xsd:extension base="TVirtualBox">112 <xsd:attribute name="version" type="xsd:token" fixed="1.2-solaris" use="required"/>113 </xsd:extension>114 </xsd:complexContent>115 </xsd:complexType>116 </xsd:element>117 118 110 </xsd:schema> -
trunk/src/VBox/Main/xml/VirtualBox-settings-windows.xsd
r6606 r7442 27 27 <xsd:annotation> 28 28 <xsd:documentation xml:lang="en"> 29 innotek VirtualBox Settings Schema Version 1.0-windows.30 Copyright (c) 2004-200 7innotek GmbH.29 innotek VirtualBox Settings Schema (windows). 30 Copyright (c) 2004-2008 innotek GmbH. 31 31 </xsd:documentation> 32 32 </xsd:annotation> 33 33 34 34 <xsd:include schemaLocation="VirtualBox-settings-common.xsd"/> 35 36 <!-- 37 this includes a computed VirtualBox element definition that contains 38 a proper 'version' attribute constraint (e.g. recent verison number 39 and platform suffix) 40 --> 41 <xsd:include schemaLocation="VirtualBox-settings-root.xsd"/> 35 42 36 43 <!-- … … 100 107 </xsd:complexType> 101 108 102 <!--103 // Root element104 /////////////////////////////////////////////////////////////////////////105 -->106 107 <xsd:element name="VirtualBox">108 <xsd:complexType>109 <xsd:complexContent>110 <xsd:extension base="TVirtualBox">111 <xsd:attribute name="version" type="xsd:token" fixed="1.2-windows" use="required"/>112 </xsd:extension>113 </xsd:complexContent>114 </xsd:complexType>115 </xsd:element>116 117 109 </xsd:schema>
Note:
See TracChangeset
for help on using the changeset viewer.