Changeset 7442 in vbox for trunk/src/VBox/Main
- Timestamp:
- Mar 13, 2008 2:33:18 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 28880
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
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.