Changeset 24286 in vbox
- Timestamp:
- Nov 3, 2009 11:03:56 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r24255 r24286 767 767 com::SafeIfaceArray<IStorageController> ctrls; 768 768 PCFGMNODE aCtrlNodes[StorageControllerType_I82078 + 1] = {}; 769 hrc = pMachine->COMGETTER(StorageControllers)(ComSafeArrayAsOutParam(ctrls)); H();769 hrc = pMachine->COMGETTER(StorageControllers)(ComSafeArrayAsOutParam(ctrls)); H(); 770 770 771 771 for (size_t i = 0; i < ctrls.size(); ++ i) 772 772 { 773 PCFGMNODE pCtlInst = NULL; /* /Devices/<name>/0/ */774 773 StorageControllerType_T enmCtrlType; 775 StorageBus_T enmBus; 776 bool fSCSI = false; 777 Bstr controllerName; 778 ULONG ulInstance; 779 780 rc = ctrls[i]->COMGETTER(ControllerType)(&enmCtrlType); H(); 781 rc = ctrls[i]->COMGETTER(Bus)(&enmBus); H(); 782 rc = ctrls[i]->COMGETTER(Name)(controllerName.asOutParam()); H(); 783 rc = ctrls[i]->COMGETTER(Instance)(&ulInstance); H(); 784 774 rc = ctrls[i]->COMGETTER(ControllerType)(&enmCtrlType); H(); 775 AssertRelease((unsigned)enmCtrlType < RT_ELEMENTS(aCtrlNodes)); 776 777 StorageBus_T enmBus; 778 rc = ctrls[i]->COMGETTER(Bus)(&enmBus); H(); 779 780 Bstr controllerName; 781 rc = ctrls[i]->COMGETTER(Name)(controllerName.asOutParam()); H(); 782 783 ULONG ulInstance = 999; 784 rc = ctrls[i]->COMGETTER(Instance)(&ulInstance); H(); 785 786 /* /Devices/<ctrldev>/ */ 785 787 const char *pszCtrlDev = pConsole->controllerTypeToDev(enmCtrlType); 786 787 if (aCtrlNodes[enmCtrlType]) 788 pDev = aCtrlNodes[enmCtrlType]; 789 else 790 { 791 rc = CFGMR3InsertNode(pDevices, pszCtrlDev, &pDev); RC_CHECK(); 792 793 if ( (enmCtrlType == StorageControllerType_PIIX3) 794 || (enmCtrlType == StorageControllerType_PIIX4) 795 || (enmCtrlType == StorageControllerType_ICH6)) 796 { 797 aCtrlNodes[StorageControllerType_PIIX3] = pDev; 798 aCtrlNodes[StorageControllerType_PIIX4] = pDev; 799 aCtrlNodes[StorageControllerType_ICH6] = pDev; 800 } 801 else 802 aCtrlNodes[enmCtrlType] = pDev; 803 } 804 805 rc = CFGMR3InsertNodeF(pDev, &pCtlInst, "%u", ulInstance); RC_CHECK(); 806 788 pDev = aCtrlNodes[enmCtrlType]; 789 if (!pDev) 790 { 791 rc = CFGMR3InsertNode(pDevices, pszCtrlDev, &pDev); RC_CHECK(); 792 aCtrlNodes[enmCtrlType] = pDev; /* IDE variants are handled in the switch */ 793 } 794 795 /* /Devices/<ctrldev>/<instance>/ */ 796 PCFGMNODE pCtlInst = NULL; 797 rc = CFGMR3InsertNodeF(pDev, &pCtlInst, "%u", ulInstance); RC_CHECK(); 798 799 /* Device config: /Devices/<ctrldev>/<instance>/<values> & /ditto/Config/<values> */ 800 rc = CFGMR3InsertInteger(pCtlInst, "Trusted", 1); RC_CHECK(); 801 rc = CFGMR3InsertNode(pCtlInst, "Config", &pCfg); RC_CHECK(); 802 803 bool fSCSI = false; 807 804 switch (enmCtrlType) 808 805 { 809 806 case StorageControllerType_LsiLogic: 810 807 { 811 rc = CFGMR3InsertInteger(pCtlInst, "Trusted", 1); RC_CHECK(); 812 rc = CFGMR3InsertInteger(pCtlInst, "PCIDeviceNo", 20); RC_CHECK(); 808 rc = CFGMR3InsertInteger(pCtlInst, "PCIDeviceNo", 20); RC_CHECK(); 813 809 Assert(!afPciDeviceNo[20]); 814 810 afPciDeviceNo[20] = true; 815 rc = CFGMR3InsertInteger(pCtlInst, "PCIFunctionNo", 0); RC_CHECK(); 816 rc = CFGMR3InsertNode(pCtlInst, "Config", &pCfg); RC_CHECK(); 811 rc = CFGMR3InsertInteger(pCtlInst, "PCIFunctionNo", 0); RC_CHECK(); 817 812 fSCSI = true; 818 813 819 814 /* Attach the status driver */ 820 rc = CFGMR3InsertNode(pCtlInst, "LUN#999", &pLunL0); 821 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); 822 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); 815 rc = CFGMR3InsertNode(pCtlInst, "LUN#999", &pLunL0); RC_CHECK(); 816 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 817 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 823 818 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapSCSILeds[0]); RC_CHECK(); 824 rc = CFGMR3InsertInteger(pCfg, "First", 0); 825 rc = CFGMR3InsertInteger(pCfg, "Last", 15); 819 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 820 rc = CFGMR3InsertInteger(pCfg, "Last", 15); RC_CHECK(); 826 821 break; 827 822 } … … 829 824 case StorageControllerType_BusLogic: 830 825 { 831 rc = CFGMR3InsertInteger(pCtlInst, "Trusted", 1); RC_CHECK(); 832 rc = CFGMR3InsertInteger(pCtlInst, "PCIDeviceNo", 21); RC_CHECK(); 826 rc = CFGMR3InsertInteger(pCtlInst, "PCIDeviceNo", 21); RC_CHECK(); 833 827 Assert(!afPciDeviceNo[21]); 834 828 afPciDeviceNo[21] = true; 835 rc = CFGMR3InsertInteger(pCtlInst, "PCIFunctionNo", 0); RC_CHECK(); 836 rc = CFGMR3InsertNode(pCtlInst, "Config", &pCfg); RC_CHECK(); 829 rc = CFGMR3InsertInteger(pCtlInst, "PCIFunctionNo", 0); RC_CHECK(); 837 830 fSCSI = true; 838 831 839 832 /* Attach the status driver */ 840 rc = CFGMR3InsertNode(pCtlInst, "LUN#999", &pLunL0); 841 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); 842 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); 833 rc = CFGMR3InsertNode(pCtlInst, "LUN#999", &pLunL0); RC_CHECK(); 834 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 835 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 843 836 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapSCSILeds[0]); RC_CHECK(); 844 rc = CFGMR3InsertInteger(pCfg, "First", 0); 845 rc = CFGMR3InsertInteger(pCfg, "Last", 15); 837 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 838 rc = CFGMR3InsertInteger(pCfg, "Last", 15); RC_CHECK(); 846 839 break; 847 840 } … … 849 842 case StorageControllerType_IntelAhci: 850 843 { 851 rc = CFGMR3InsertInteger(pCtlInst, "Trusted", 1); RC_CHECK(); 852 rc = CFGMR3InsertInteger(pCtlInst, "PCIDeviceNo", 13); RC_CHECK(); 844 rc = CFGMR3InsertInteger(pCtlInst, "PCIDeviceNo", 13); RC_CHECK(); 853 845 Assert(!afPciDeviceNo[13]); 854 846 afPciDeviceNo[13] = true; 855 rc = CFGMR3InsertInteger(pCtlInst, "PCIFunctionNo", 0); RC_CHECK(); 856 rc = CFGMR3InsertNode(pCtlInst, "Config", &pCfg); RC_CHECK(); 847 rc = CFGMR3InsertInteger(pCtlInst, "PCIFunctionNo", 0); RC_CHECK(); 857 848 858 849 ULONG cPorts = 0; 859 hrc = ctrls[i]->COMGETTER(PortCount)(&cPorts); H();860 rc = CFGMR3InsertInteger(pCfg, "PortCount", cPorts); RC_CHECK();850 hrc = ctrls[i]->COMGETTER(PortCount)(&cPorts); H(); 851 rc = CFGMR3InsertInteger(pCfg, "PortCount", cPorts); RC_CHECK(); 861 852 862 853 /* Needed configuration values for the bios. */ 863 854 if (pBiosCfg) 864 855 { 865 rc = CFGMR3InsertString(pBiosCfg, "SataHardDiskDevice", "ahci"); RC_CHECK();856 rc = CFGMR3InsertString(pBiosCfg, "SataHardDiskDevice", "ahci"); RC_CHECK(); 866 857 } 867 858 868 859 for (uint32_t j = 0; j < 4; ++j) 869 860 { 870 static const char * s_apszConfig[4] =861 static const char * const s_apszConfig[4] = 871 862 { "PrimaryMaster", "PrimarySlave", "SecondaryMaster", "SecondarySlave" }; 872 static const char * s_apszBiosConfig[4] =863 static const char * const s_apszBiosConfig[4] = 873 864 { "SataPrimaryMasterLUN", "SataPrimarySlaveLUN", "SataSecondaryMasterLUN", "SataSecondarySlaveLUN" }; 874 865 875 866 LONG lPortNumber = -1; 876 hrc = ctrls[i]->GetIDEEmulationPort(j, &lPortNumber); H();877 rc = CFGMR3InsertInteger(pCfg, s_apszConfig[j], lPortNumber); RC_CHECK();867 hrc = ctrls[i]->GetIDEEmulationPort(j, &lPortNumber); H(); 868 rc = CFGMR3InsertInteger(pCfg, s_apszConfig[j], lPortNumber); RC_CHECK(); 878 869 if (pBiosCfg) 879 870 { … … 883 874 884 875 /* Attach the status driver */ 885 rc = CFGMR3InsertNode(pCtlInst, "LUN#999", &pLunL0); 886 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); 887 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); 876 rc = CFGMR3InsertNode(pCtlInst, "LUN#999", &pLunL0); RC_CHECK(); 877 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 878 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 888 879 AssertRelease(cPorts <= RT_ELEMENTS(pConsole->mapSATALeds)); 889 880 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapSATALeds[0]); RC_CHECK(); 890 rc = CFGMR3InsertInteger(pCfg, "First", 0); 891 rc = CFGMR3InsertInteger(pCfg, "Last", cPorts - 1); 881 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 882 rc = CFGMR3InsertInteger(pCfg, "Last", cPorts - 1); RC_CHECK(); 892 883 break; 893 884 } … … 900 891 * IDE (update this when the main interface changes) 901 892 */ 902 rc = CFGMR3InsertInteger(pCtlInst, "Trusted", 1); /* boolean */ RC_CHECK();903 893 rc = CFGMR3InsertInteger(pCtlInst, "PCIDeviceNo", 1); RC_CHECK(); 904 894 Assert(!afPciDeviceNo[1]); 905 895 afPciDeviceNo[1] = true; 906 896 rc = CFGMR3InsertInteger(pCtlInst, "PCIFunctionNo", 1); RC_CHECK(); 907 rc = CFGMR3InsertNode(pCtlInst, "Config", &pCfg); RC_CHECK();908 897 rc = CFGMR3InsertString(pCfg, "Type", controllerString(enmCtrlType)); RC_CHECK(); 909 898 … … 915 904 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 916 905 rc = CFGMR3InsertInteger(pCfg, "Last", 3); RC_CHECK(); 906 907 /* IDE flavors */ 908 aCtrlNodes[StorageControllerType_PIIX3] = pDev; 909 aCtrlNodes[StorageControllerType_PIIX4] = pDev; 910 aCtrlNodes[StorageControllerType_ICH6] = pDev; 917 911 break; 918 912 } 913 919 914 case StorageControllerType_I82078: 920 915 { … … 923 918 */ 924 919 fFdcEnabled = true; 925 rc = CFGMR3InsertInteger(pCtlInst, "Trusted", 1); RC_CHECK(); 926 rc = CFGMR3InsertNode(pCtlInst, "Config", &pCfg); RC_CHECK(); 927 rc = CFGMR3InsertInteger(pCfg, "IRQ", 6); RC_CHECK(); 928 rc = CFGMR3InsertInteger(pCfg, "DMA", 2); RC_CHECK(); 929 rc = CFGMR3InsertInteger(pCfg, "MemMapped", 0 ); RC_CHECK(); 930 rc = CFGMR3InsertInteger(pCfg, "IOBase", 0x3f0); RC_CHECK(); 920 rc = CFGMR3InsertInteger(pCfg, "IRQ", 6); RC_CHECK(); 921 rc = CFGMR3InsertInteger(pCfg, "DMA", 2); RC_CHECK(); 922 rc = CFGMR3InsertInteger(pCfg, "MemMapped", 0 ); RC_CHECK(); 923 rc = CFGMR3InsertInteger(pCfg, "IOBase", 0x3f0); RC_CHECK(); 931 924 932 925 /* Attach the status driver */ … … 947 940 com::SafeIfaceArray<IMediumAttachment> atts; 948 941 hrc = pMachine->GetMediumAttachmentsOfController(controllerName, 949 ComSafeArrayAsOutParam(atts)); H(); 950 951 for (size_t j = 0; j < atts.size(); ++ j) 952 { 953 BOOL fHostDrive = FALSE; 954 942 ComSafeArrayAsOutParam(atts)); H(); 943 944 for (size_t j = 0; j < atts.size(); ++j) 945 { 955 946 ComPtr<IMedium> medium; 956 hrc = atts [j]->COMGETTER(Medium)(medium.asOutParam()); H();947 hrc = atts [j]->COMGETTER(Medium)(medium.asOutParam()); H(); 957 948 LONG lDev; 958 hrc = atts[j]->COMGETTER(Device)(&lDev); H();949 hrc = atts[j]->COMGETTER(Device)(&lDev); H(); 959 950 LONG lPort; 960 hrc = atts[j]->COMGETTER(Port)(&lPort); H();951 hrc = atts[j]->COMGETTER(Port)(&lPort); H(); 961 952 DeviceType_T lType; 962 hrc = atts[j]->COMGETTER(Type)(&lType); H();963 964 unsigned uLUN = 0;965 hrc = pConsole->convertBusPortDeviceToLun(enmBus, lPort, lDev, uLUN); H();966 rc = CFGMR3InsertNodeF(pCtlInst, &pLunL0, "LUN#%u", uLUN); RC_CHECK();953 hrc = atts[j]->COMGETTER(Type)(&lType); H(); 954 955 unsigned uLUN; 956 hrc = pConsole->convertBusPortDeviceToLun(enmBus, lPort, lDev, uLUN); H(); 957 rc = CFGMR3InsertNodeF(pCtlInst, &pLunL0, "LUN#%u", uLUN); RC_CHECK(); 967 958 968 959 /* SCSI has a another driver between device and block. */ 969 960 if (fSCSI) 970 961 { 971 rc = CFGMR3InsertString(pLunL0, "Driver", "SCSI"); RC_CHECK(); 972 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 973 974 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL0); RC_CHECK(); 975 } 976 962 rc = CFGMR3InsertString(pLunL0, "Driver", "SCSI"); RC_CHECK(); 963 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 964 965 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL0); RC_CHECK(); 966 } 967 968 BOOL fHostDrive = FALSE; 977 969 if (!medium.isNull()) 978 970 { 979 hrc = medium->COMGETTER(HostDrive)(&fHostDrive); H();971 hrc = medium->COMGETTER(HostDrive)(&fHostDrive); H(); 980 972 } 981 973 … … 985 977 if (lType == DeviceType_DVD) 986 978 { 987 rc = CFGMR3InsertString(pLunL0, "Driver", "HostDVD"); RC_CHECK();988 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK();989 990 hrc = medium->COMGETTER(Location)(&str); H();991 rc = CFGMR3InsertStringW(pCfg, "Path", str); RC_CHECK();979 rc = CFGMR3InsertString(pLunL0, "Driver", "HostDVD"); RC_CHECK(); 980 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 981 982 hrc = medium->COMGETTER(Location)(&str); H(); 983 rc = CFGMR3InsertStringW(pCfg, "Path", str); RC_CHECK(); 992 984 STR_FREE(); 993 985 994 BOOL fPassthrough = false;995 hrc = atts[j]->COMGETTER(Passthrough)(&fPassthrough); H();996 rc = CFGMR3InsertInteger(pCfg, "Passthrough", !!fPassthrough); RC_CHECK();986 BOOL fPassthrough; 987 hrc = atts[j]->COMGETTER(Passthrough)(&fPassthrough); H(); 988 rc = CFGMR3InsertInteger(pCfg, "Passthrough", !!fPassthrough); RC_CHECK(); 997 989 } 998 990 else if (lType == DeviceType_Floppy) 999 991 { 1000 rc = CFGMR3InsertString(pLunL0, "Driver", "HostFloppy"); RC_CHECK();1001 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK();1002 1003 hrc = medium->COMGETTER(Location)(&str); H();1004 rc = CFGMR3InsertStringW(pCfg, "Path", str); RC_CHECK();992 rc = CFGMR3InsertString(pLunL0, "Driver", "HostFloppy"); RC_CHECK(); 993 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 994 995 hrc = medium->COMGETTER(Location)(&str); H(); 996 rc = CFGMR3InsertStringW(pCfg, "Path", str); RC_CHECK(); 1005 997 STR_FREE(); 1006 998 } … … 1008 1000 else 1009 1001 { 1010 rc = CFGMR3InsertString(pLunL0, "Driver", "Block"); RC_CHECK();1011 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK();1002 rc = CFGMR3InsertString(pLunL0, "Driver", "Block"); RC_CHECK(); 1003 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1012 1004 switch (lType) 1013 1005 { 1014 1006 case DeviceType_DVD: 1015 rc = CFGMR3InsertString(pCfg, "Type", "DVD"); RC_CHECK();1016 rc = CFGMR3InsertInteger(pCfg, "Mountable", 1); RC_CHECK();1007 rc = CFGMR3InsertString(pCfg, "Type", "DVD"); RC_CHECK(); 1008 rc = CFGMR3InsertInteger(pCfg, "Mountable", 1); RC_CHECK(); 1017 1009 break; 1018 1010 case DeviceType_Floppy: 1019 rc = CFGMR3InsertString(pCfg, "Type", "Floppy 1.44"); RC_CHECK();1020 rc = CFGMR3InsertInteger(pCfg, "Mountable", 1); RC_CHECK();1011 rc = CFGMR3InsertString(pCfg, "Type", "Floppy 1.44"); RC_CHECK(); 1012 rc = CFGMR3InsertInteger(pCfg, "Mountable", 1); RC_CHECK(); 1021 1013 break; 1022 1014 case DeviceType_HardDisk: 1023 1015 default: 1024 rc = CFGMR3InsertString(pCfg, "Type", "HardDisk"); RC_CHECK();1025 rc = CFGMR3InsertInteger(pCfg, "Mountable", 0); RC_CHECK();1016 rc = CFGMR3InsertString(pCfg, "Type", "HardDisk"); RC_CHECK(); 1017 rc = CFGMR3InsertInteger(pCfg, "Mountable", 0); RC_CHECK(); 1026 1018 } 1027 1019 1028 1020 if (!medium.isNull()) 1029 1021 { 1030 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK();1031 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); RC_CHECK();1032 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK();1033 1034 hrc = medium->COMGETTER(Location)(&str); H();1035 rc = CFGMR3InsertStringW(pCfg, "Path", str); RC_CHECK();1022 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 1023 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); RC_CHECK(); 1024 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 1025 1026 hrc = medium->COMGETTER(Location)(&str); H(); 1027 rc = CFGMR3InsertStringW(pCfg, "Path", str); RC_CHECK(); 1036 1028 STR_FREE(); 1037 1029 1038 hrc = medium->COMGETTER(Format)(&str); H();1039 rc = CFGMR3InsertStringW(pCfg, "Format", str); RC_CHECK();1030 hrc = medium->COMGETTER(Format)(&str); H(); 1031 rc = CFGMR3InsertStringW(pCfg, "Format", str); RC_CHECK(); 1040 1032 STR_FREE(); 1041 1033 … … 1043 1035 if (lType == DeviceType_DVD) 1044 1036 { 1045 rc = CFGMR3InsertInteger(pCfg, "ReadOnly", 1); RC_CHECK();1037 rc = CFGMR3InsertInteger(pCfg, "ReadOnly", 1); RC_CHECK(); 1046 1038 } 1047 1039 … … 1052 1044 hrc = medium->GetProperties(NULL, 1053 1045 ComSafeArrayAsOutParam(names), 1054 ComSafeArrayAsOutParam(values)); H();1046 ComSafeArrayAsOutParam(values)); H(); 1055 1047 1056 1048 if (names.size() != 0) 1057 1049 { 1058 1050 PCFGMNODE pVDC; 1059 rc = CFGMR3InsertNode(pCfg, "VDConfig", &pVDC); RC_CHECK();1051 rc = CFGMR3InsertNode(pCfg, "VDConfig", &pVDC); RC_CHECK(); 1060 1052 for (size_t ii = 0; ii < names.size(); ++ii) 1061 1053 { … … 1064 1056 Utf8Str name = names[ii]; 1065 1057 Utf8Str value = values[ii]; 1066 rc = CFGMR3InsertString(pVDC, name.c_str(), value.c_str()); 1058 rc = CFGMR3InsertString(pVDC, name.c_str(), value.c_str()); AssertRC(rc); /** @todo r=bird: why not RC_CHECK() here? (I added the AssertRC.)*/ 1067 1059 if ( name.compare("HostIPStack") == 0 1068 1060 && value.compare("0") == 0) … … 1076 1068 for (PCFGMNODE pParent = pCfg;;) 1077 1069 { 1078 hrc = parentMedium->COMGETTER(Parent)(medium.asOutParam()); H();1070 hrc = parentMedium->COMGETTER(Parent)(medium.asOutParam()); H(); 1079 1071 if (medium.isNull()) 1080 1072 break; 1081 1073 1082 1074 PCFGMNODE pCur; 1083 rc = CFGMR3InsertNode(pParent, "Parent", &pCur); RC_CHECK();1084 hrc = medium->COMGETTER(Location)(&str); H();1085 rc = CFGMR3InsertStringW(pCur, "Path", str); RC_CHECK();1075 rc = CFGMR3InsertNode(pParent, "Parent", &pCur); RC_CHECK(); 1076 hrc = medium->COMGETTER(Location)(&str); H(); 1077 rc = CFGMR3InsertStringW(pCur, "Path", str); RC_CHECK(); 1086 1078 STR_FREE(); 1087 1079 1088 hrc = medium->COMGETTER(Format)(&str); H();1089 rc = CFGMR3InsertStringW(pCur, "Format", str); RC_CHECK();1080 hrc = medium->COMGETTER(Format)(&str); H(); 1081 rc = CFGMR3InsertStringW(pCur, "Format", str); RC_CHECK(); 1090 1082 STR_FREE(); 1091 1083 … … 1095 1087 hrc = medium->GetProperties(NULL, 1096 1088 ComSafeArrayAsOutParam(names), 1097 ComSafeArrayAsOutParam(values)); H();1089 ComSafeArrayAsOutParam(values)); H(); 1098 1090 1099 1091 if (names.size() != 0) 1100 1092 { 1101 1093 PCFGMNODE pVDC; 1102 rc = CFGMR3InsertNode(pCur, "VDConfig", &pVDC); RC_CHECK();1094 rc = CFGMR3InsertNode(pCur, "VDConfig", &pVDC); RC_CHECK(); 1103 1095 for (size_t ii = 0; ii < names.size(); ++ii) 1104 1096 { … … 1107 1099 Utf8Str name = names[ii]; 1108 1100 Utf8Str value = values[ii]; 1109 rc = CFGMR3InsertString(pVDC, name.c_str(), value.c_str()); 1101 rc = CFGMR3InsertString(pVDC, name.c_str(), value.c_str()); AssertRC(rc); /** @todo r=bird: why not RC_HCECK here? (I added the AssertRC.)*/ 1110 1102 if ( name.compare("HostIPStack") == 0 1111 1103 && value.compare("0") == 0) … … 1119 1111 if (!fHostIP) 1120 1112 { 1121 rc = CFGMR3InsertInteger(pCfg, "HostIPStack", 0); RC_CHECK();1113 rc = CFGMR3InsertInteger(pCfg, "HostIPStack", 0); RC_CHECK(); 1122 1114 } 1123 1115
Note:
See TracChangeset
for help on using the changeset viewer.