- Timestamp:
- Oct 16, 2008 12:27:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl2.cpp
r13293 r13338 192 192 /* VPID (VT-x) */ 193 193 BOOL fEnableVPID = false; 194 hrc = pMachine->COMGETTER(HWVirtExVPIDEnabled)(&fEnableVPID); H();195 rc = CFGMR3InsertInteger(pRoot, "EnableVPID", fEnableVPID); RC_CHECK();194 hrc = pMachine->COMGETTER(HWVirtExVPIDEnabled)(&fEnableVPID); H(); 195 rc = CFGMR3InsertInteger(pRoot, "EnableVPID", fEnableVPID); RC_CHECK(); 196 196 197 197 /* Physical Address Extension (PAE) */ … … 416 416 417 417 ComPtr<IFloppyImage> floppyImage; 418 hrc = floppyDrive->GetImage(floppyImage.asOutParam()); 418 hrc = floppyDrive->GetImage(floppyImage.asOutParam()); H(); 419 419 if (floppyImage) 420 420 { 421 421 pConsole->meFloppyState = DriveState_ImageMounted; 422 rc = CFGMR3InsertString(pLunL0, "Driver", "Block"); 423 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); 424 rc = CFGMR3InsertString(pCfg, "Type", "Floppy 1.44"); 425 rc = CFGMR3InsertInteger(pCfg, "Mountable", 1); 426 427 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); 428 rc = CFGMR3InsertString(pLunL1, "Driver", "RawImage"); 429 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); 430 hrc = floppyImage->COMGETTER(FilePath)(&str); 422 rc = CFGMR3InsertString(pLunL0, "Driver", "Block"); RC_CHECK(); 423 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 424 rc = CFGMR3InsertString(pCfg, "Type", "Floppy 1.44"); RC_CHECK(); 425 rc = CFGMR3InsertInteger(pCfg, "Mountable", 1); RC_CHECK(); 426 427 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 428 rc = CFGMR3InsertString(pLunL1, "Driver", "RawImage"); RC_CHECK(); 429 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 430 hrc = floppyImage->COMGETTER(FilePath)(&str); H(); 431 431 STR_CONV(); 432 rc = CFGMR3InsertString(pCfg, "Path", psz); 432 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 433 433 STR_FREE(); 434 434 } … … 436 436 { 437 437 ComPtr<IHostFloppyDrive> hostFloppyDrive; 438 hrc = floppyDrive->GetHostDrive(hostFloppyDrive.asOutParam()); 438 hrc = floppyDrive->GetHostDrive(hostFloppyDrive.asOutParam()); H(); 439 439 if (hostFloppyDrive) 440 440 { 441 441 pConsole->meFloppyState = DriveState_HostDriveCaptured; 442 rc = CFGMR3InsertString(pLunL0, "Driver", "HostFloppy"); 443 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); 444 hrc = hostFloppyDrive->COMGETTER(Name)(&str); 442 rc = CFGMR3InsertString(pLunL0, "Driver", "HostFloppy"); RC_CHECK(); 443 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 444 hrc = hostFloppyDrive->COMGETTER(Name)(&str); H(); 445 445 STR_CONV(); 446 rc = CFGMR3InsertString(pCfg, "Path", psz); 446 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 447 447 STR_FREE(); 448 448 } … … 450 450 { 451 451 pConsole->meFloppyState = DriveState_NotMounted; 452 rc = CFGMR3InsertString(pLunL0, "Driver", "Block"); RC_CHECK();453 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK();454 rc = CFGMR3InsertString(pCfg, "Type", "Floppy 1.44"); RC_CHECK();455 rc = CFGMR3InsertInteger(pCfg, "Mountable", 1); RC_CHECK();452 rc = CFGMR3InsertString(pLunL0, "Driver", "Block"); RC_CHECK(); 453 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 454 rc = CFGMR3InsertString(pCfg, "Type", "Floppy 1.44"); RC_CHECK(); 455 rc = CFGMR3InsertInteger(pCfg, "Mountable", 1); RC_CHECK(); 456 456 } 457 457 } … … 580 580 value = 2; 581 581 } 582 rc = CFGMR3InsertInteger(pCfg, "ShowBootMenu", value); RC_CHECK();582 rc = CFGMR3InsertInteger(pCfg, "ShowBootMenu", value); RC_CHECK(); 583 583 584 584 /* Custom VESA mode list */ … … 653 653 if (enabled) 654 654 { 655 rc = CFGMR3InsertNode(pDevices, "ahci", &pDev); 656 rc = CFGMR3InsertNode(pDev, "0", &pSataInst); 657 rc = CFGMR3InsertInteger(pSataInst, "Trusted", 1); 658 rc = CFGMR3InsertInteger(pSataInst, "PCIDeviceNo", 13); 655 rc = CFGMR3InsertNode(pDevices, "ahci", &pDev); RC_CHECK(); 656 rc = CFGMR3InsertNode(pDev, "0", &pSataInst); RC_CHECK(); 657 rc = CFGMR3InsertInteger(pSataInst, "Trusted", 1); RC_CHECK(); 658 rc = CFGMR3InsertInteger(pSataInst, "PCIDeviceNo", 13); RC_CHECK(); 659 659 Assert(!afPciDeviceNo[13]); 660 660 afPciDeviceNo[13] = true; 661 rc = CFGMR3InsertInteger(pSataInst, "PCIFunctionNo", 0); 662 rc = CFGMR3InsertNode(pSataInst, "Config", &pCfg); 661 rc = CFGMR3InsertInteger(pSataInst, "PCIFunctionNo", 0); RC_CHECK(); 662 rc = CFGMR3InsertNode(pSataInst, "Config", &pCfg); RC_CHECK(); 663 663 664 664 ULONG cPorts = 0; 665 hrc = sataController->COMGETTER(PortCount)(&cPorts); 666 rc = CFGMR3InsertInteger(pCfg, "PortCount", cPorts); 665 hrc = sataController->COMGETTER(PortCount)(&cPorts); H(); 666 rc = CFGMR3InsertInteger(pCfg, "PortCount", cPorts); RC_CHECK(); 667 667 668 668 /* Needed configuration values for the bios. */ 669 rc = CFGMR3InsertString(pBiosCfg, "SataHardDiskDevice", "ahci"); 669 rc = CFGMR3InsertString(pBiosCfg, "SataHardDiskDevice", "ahci"); RC_CHECK(); 670 670 671 671 for (uint32_t i = 0; i < 4; i++) … … 749 749 char szLUN[16]; 750 750 RTStrPrintf(szLUN, sizeof(szLUN), "LUN#%d", iLUN); 751 rc = CFGMR3InsertNode(pHardDiskCtl, szLUN, &pLunL0); 752 rc = CFGMR3InsertString(pLunL0, "Driver", "Block"); 753 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); 754 rc = CFGMR3InsertString(pCfg, "Type", "HardDisk"); 755 rc = CFGMR3InsertInteger(pCfg, "Mountable", 0); 751 rc = CFGMR3InsertNode(pHardDiskCtl, szLUN, &pLunL0); RC_CHECK(); 752 rc = CFGMR3InsertString(pLunL0, "Driver", "Block"); RC_CHECK(); 753 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 754 rc = CFGMR3InsertString(pCfg, "Type", "HardDisk"); RC_CHECK(); 755 rc = CFGMR3InsertInteger(pCfg, "Mountable", 0); RC_CHECK(); 756 756 757 757 HardDiskStorageType_T hddType; … … 762 762 AssertBreakStmt (!vdiDisk.isNull(), hrc = E_FAIL); 763 763 764 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); 765 rc = CFGMR3InsertString(pLunL1, "Driver", "VBoxHDD"); 766 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); 767 hrc = vdiDisk->COMGETTER(FilePath)(&str); 764 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 765 rc = CFGMR3InsertString(pLunL1, "Driver", "VBoxHDD"); RC_CHECK(); 766 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 767 hrc = vdiDisk->COMGETTER(FilePath)(&str); H(); 768 768 STR_CONV(); 769 rc = CFGMR3InsertString(pCfg, "Path", psz); 769 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 770 770 STR_FREE(); 771 771 … … 775 775 { 776 776 ComPtr<IHardDisk> curHardDisk; 777 hrc = parentHardDisk->COMGETTER(Parent)(curHardDisk.asOutParam()); 777 hrc = parentHardDisk->COMGETTER(Parent)(curHardDisk.asOutParam()); H(); 778 778 if (!curHardDisk) 779 779 break; … … 783 783 784 784 PCFGMNODE pCur; 785 rc = CFGMR3InsertNode(pParent, "Parent", &pCur); 786 hrc = vdiDisk->COMGETTER(FilePath)(&str); 785 rc = CFGMR3InsertNode(pParent, "Parent", &pCur); RC_CHECK(); 786 hrc = vdiDisk->COMGETTER(FilePath)(&str); H(); 787 787 STR_CONV(); 788 rc = CFGMR3InsertString(pCur, "Path", psz); 788 rc = CFGMR3InsertString(pCur, "Path", psz); RC_CHECK(); 789 789 STR_FREE(); 790 rc = CFGMR3InsertInteger(pCur, "ReadOnly", 1); 790 rc = CFGMR3InsertInteger(pCur, "ReadOnly", 1); RC_CHECK(); 791 791 792 792 /* next */ … … 800 800 AssertBreakStmt (!iSCSIDisk.isNull(), hrc = E_FAIL); 801 801 802 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); 803 rc = CFGMR3InsertString(pLunL1, "Driver", "iSCSI"); 804 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); 802 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 803 rc = CFGMR3InsertString(pLunL1, "Driver", "iSCSI"); RC_CHECK(); 804 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 805 805 806 806 /* Set up the iSCSI initiator driver configuration. */ 807 hrc = iSCSIDisk->COMGETTER(Target)(&str); 807 hrc = iSCSIDisk->COMGETTER(Target)(&str); H(); 808 808 STR_CONV(); 809 rc = CFGMR3InsertString(pCfg, "TargetName", psz); 809 rc = CFGMR3InsertString(pCfg, "TargetName", psz); RC_CHECK(); 810 810 STR_FREE(); 811 811 812 812 ULONG64 lun; 813 hrc = iSCSIDisk->COMGETTER(Lun)(&lun); 814 rc = CFGMR3InsertInteger(pCfg, "LUN", lun); 815 816 hrc = iSCSIDisk->COMGETTER(Server)(&str); 813 hrc = iSCSIDisk->COMGETTER(Lun)(&lun); H(); 814 rc = CFGMR3InsertInteger(pCfg, "LUN", lun); RC_CHECK(); 815 816 hrc = iSCSIDisk->COMGETTER(Server)(&str); H(); 817 817 STR_CONV(); 818 818 USHORT port; 819 hrc = iSCSIDisk->COMGETTER(Port)(&port); 819 hrc = iSCSIDisk->COMGETTER(Port)(&port); H(); 820 820 if (port != 0) 821 821 { 822 822 char *pszTN; 823 823 RTStrAPrintf(&pszTN, "%s:%u", psz, port); 824 rc = CFGMR3InsertString(pCfg, "TargetAddress", pszTN); 824 rc = CFGMR3InsertString(pCfg, "TargetAddress", pszTN); RC_CHECK(); 825 825 RTStrFree(pszTN); 826 826 } 827 827 else 828 828 { 829 rc = CFGMR3InsertString(pCfg, "TargetAddress", psz); 829 rc = CFGMR3InsertString(pCfg, "TargetAddress", psz); RC_CHECK(); 830 830 } 831 831 STR_FREE(); 832 832 833 hrc = iSCSIDisk->COMGETTER(UserName)(&str); 833 hrc = iSCSIDisk->COMGETTER(UserName)(&str); H(); 834 834 if (str) 835 835 { 836 836 STR_CONV(); 837 rc = CFGMR3InsertString(pCfg, "InitiatorUsername", psz); 837 rc = CFGMR3InsertString(pCfg, "InitiatorUsername", psz); RC_CHECK(); 838 838 STR_FREE(); 839 839 } 840 840 841 hrc = iSCSIDisk->COMGETTER(Password)(&str); 841 hrc = iSCSIDisk->COMGETTER(Password)(&str); H(); 842 842 if (str) 843 843 { 844 844 STR_CONV(); 845 rc = CFGMR3InsertString(pCfg, "InitiatorSecret", psz); 845 rc = CFGMR3InsertString(pCfg, "InitiatorSecret", psz); RC_CHECK(); 846 846 STR_FREE(); 847 847 } 848 848 849 849 // @todo currently there is no target username config. 850 //rc = CFGMR3InsertString(pCfg, "TargetUsername", ""); 850 //rc = CFGMR3InsertString(pCfg, "TargetUsername", ""); RC_CHECK(); 851 851 852 852 // @todo currently there is no target password config. 853 //rc = CFGMR3InsertString(pCfg, "TargetSecret", ""); 853 //rc = CFGMR3InsertString(pCfg, "TargetSecret", ""); RC_CHECK(); 854 854 855 855 /* The iSCSI initiator needs an attached iSCSI transport driver. */ 856 rc = CFGMR3InsertNode(pLunL1, "AttachedDriver", &pLunL2); 857 rc = CFGMR3InsertString(pLunL2, "Driver", "iSCSITCP"); 856 rc = CFGMR3InsertNode(pLunL1, "AttachedDriver", &pLunL2); RC_CHECK(); 857 rc = CFGMR3InsertString(pLunL2, "Driver", "iSCSITCP"); RC_CHECK(); 858 858 /* Currently the transport driver has no config options. */ 859 859 } … … 863 863 AssertBreakStmt (!vmdkDisk.isNull(), hrc = E_FAIL); 864 864 865 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); 865 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 866 866 #if 1 /* Enable new VD container code (and new VMDK), as the bugs are fixed. */ 867 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); 867 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); RC_CHECK(); 868 868 #else 869 rc = CFGMR3InsertString(pLunL1, "Driver", "VmdkHDD"); 869 rc = CFGMR3InsertString(pLunL1, "Driver", "VmdkHDD"); RC_CHECK(); 870 870 #endif 871 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); 872 hrc = vmdkDisk->COMGETTER(FilePath)(&str); 871 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 872 hrc = vmdkDisk->COMGETTER(FilePath)(&str); H(); 873 873 STR_CONV(); 874 rc = CFGMR3InsertString(pCfg, "Path", psz); 874 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 875 875 STR_FREE(); 876 rc = CFGMR3InsertString(pCfg, "Format", "VMDK"); 876 rc = CFGMR3InsertString(pCfg, "Format", "VMDK"); RC_CHECK(); 877 877 878 878 #if defined(VBOX_WITH_PDM_ASYNC_COMPLETION) … … 882 882 * when the new HardDisk interface is merged. 883 883 */ 884 rc = CFGMR3InsertNode(pLunL1, "AttachedDriver", &pLunL2); 885 rc = CFGMR3InsertString(pLunL2, "Driver", "TransportAsync"); 884 rc = CFGMR3InsertNode(pLunL1, "AttachedDriver", &pLunL2); RC_CHECK(); 885 rc = CFGMR3InsertString(pLunL2, "Driver", "TransportAsync"); RC_CHECK(); 886 886 /* The async transport driver has no config options yet. */ 887 887 #endif … … 892 892 AssertBreakStmt (!customHardDisk.isNull(), hrc = E_FAIL); 893 893 894 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); 895 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); 896 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); 897 hrc = customHardDisk->COMGETTER(Location)(&str); 894 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 895 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); RC_CHECK(); 896 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 897 hrc = customHardDisk->COMGETTER(Location)(&str); H(); 898 898 STR_CONV(); 899 rc = CFGMR3InsertString(pCfg, "Path", psz); 899 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 900 900 STR_FREE(); 901 hrc = customHardDisk->COMGETTER(Format)(&str); 901 hrc = customHardDisk->COMGETTER(Format)(&str); H(); 902 902 STR_CONV(); 903 rc = CFGMR3InsertString(pCfg, "Format", psz); 903 rc = CFGMR3InsertString(pCfg, "Format", psz); RC_CHECK(); 904 904 STR_FREE(); 905 905 } … … 909 909 AssertBreakStmt (!vhdDisk.isNull(), hrc = E_FAIL); 910 910 911 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); 912 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); 913 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); 914 hrc = vhdDisk->COMGETTER(FilePath)(&str); 911 rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL1); RC_CHECK(); 912 rc = CFGMR3InsertString(pLunL1, "Driver", "VD"); RC_CHECK(); 913 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); 914 hrc = vhdDisk->COMGETTER(FilePath)(&str); H(); 915 915 STR_CONV(); 916 rc = CFGMR3InsertString(pCfg, "Path", psz); 917 rc = CFGMR3InsertString(pCfg, "Format", "VHD"); 916 rc = CFGMR3InsertString(pCfg, "Path", psz); RC_CHECK(); 917 rc = CFGMR3InsertString(pCfg, "Format", "VHD"); RC_CHECK(); 918 918 STR_FREE(); 919 919 } … … 1205 1205 # ifdef VBOX_WITH_CROSSBOW 1206 1206 /* Crossbow: needs the MAC address for setting up TAP. */ 1207 rc = CFGMR3InsertBytes(pCfg, "MAC", &Mac, sizeof(Mac)); RC_CHECK();1207 rc = CFGMR3InsertBytes(pCfg, "MAC", &Mac, sizeof(Mac)); RC_CHECK(); 1208 1208 # endif 1209 1209 # else … … 1237 1237 if (!pszColon) 1238 1238 { 1239 hrc = networkAdapter->Detach(); 1239 hrc = networkAdapter->Detach(); H(); 1240 1240 return VMSetError(pVM, VERR_INTERNAL_ERROR, RT_SRC_POS, 1241 1241 N_("Malformed host interface networking name '%ls'"), … … 1318 1318 { 1319 1319 AssertMsgFailed(("Cannot get GUID for host interface '%ls'\n", hostInterfaceName)); 1320 hrc = networkAdapter->Detach(); 1320 hrc = networkAdapter->Detach(); H(); 1321 1321 } 1322 1322 else 1323 1323 { 1324 1324 # ifndef VBOX_WITH_NETFLT 1325 rc = CFGMR3InsertString(pLunL0, "Driver", "HostInterface"); RC_CHECK();1326 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK();1325 rc = CFGMR3InsertString(pLunL0, "Driver", "HostInterface"); RC_CHECK(); 1326 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1327 1327 rc = CFGMR3InsertString(pCfg, "HostInterfaceName", Utf8Str(hostInterfaceName)); RC_CHECK(); 1328 1328 # else 1329 rc = CFGMR3InsertString(pLunL0, "Driver", "IntNet"); RC_CHECK();1330 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK();1331 rc = CFGMR3InsertString(pCfg, "Trunk", Utf8Str(hostInterfaceName)); 1332 rc = CFGMR3InsertInteger(pCfg, "TrunkType", kIntNetTrunkType_NetFlt); RC_CHECK();1329 rc = CFGMR3InsertString(pLunL0, "Driver", "IntNet"); RC_CHECK(); 1330 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1331 rc = CFGMR3InsertString(pCfg, "Trunk", Utf8Str(hostInterfaceName)); RC_CHECK(); 1332 rc = CFGMR3InsertInteger(pCfg, "TrunkType", kIntNetTrunkType_NetFlt); RC_CHECK(); 1333 1333 # endif 1334 1334 Guid hostIFGuid; 1335 hrc = hostInterface->COMGETTER(Id)(hostIFGuid.asOutParam()); H();1335 hrc = hostInterface->COMGETTER(Id)(hostIFGuid.asOutParam()); H(); 1336 1336 char szDriverGUID[256] = {0}; 1337 1337 /* add curly brackets */ … … 1339 1339 strcpy(szDriverGUID + 1, hostIFGuid.toString().raw()); 1340 1340 strcat(szDriverGUID, "}"); 1341 rc = CFGMR3InsertBytes(pCfg, "GUID", szDriverGUID, sizeof(szDriverGUID)); RC_CHECK();1341 rc = CFGMR3InsertBytes(pCfg, "GUID", szDriverGUID, sizeof(szDriverGUID)); RC_CHECK(); 1342 1342 } 1343 1343 #else … … 1369 1369 case NetworkAttachmentType_Internal: 1370 1370 { 1371 hrc = networkAdapter->COMGETTER(InternalNetwork)(&str); 1371 hrc = networkAdapter->COMGETTER(InternalNetwork)(&str); H(); 1372 1372 if (str) 1373 1373 { … … 1381 1381 else 1382 1382 { 1383 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); 1383 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK(); 1384 1384 } 1385 rc = CFGMR3InsertString(pLunL0, "Driver", "IntNet"); 1386 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); 1387 rc = CFGMR3InsertString(pCfg, "Network", psz); 1385 rc = CFGMR3InsertString(pLunL0, "Driver", "IntNet"); RC_CHECK(); 1386 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1387 rc = CFGMR3InsertString(pCfg, "Network", psz); RC_CHECK(); 1388 1388 } 1389 1389 STR_FREE(); … … 1505 1505 * Attach the status driver. 1506 1506 */ 1507 rc = CFGMR3InsertNode(pInst, "LUN#999", &pLunL0); RC_CHECK();1508 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK();1509 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK();1507 rc = CFGMR3InsertNode(pInst, "LUN#999", &pLunL0); RC_CHECK(); 1508 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 1509 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1510 1510 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapSharedFolderLed); RC_CHECK(); 1511 1511 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); … … 1537 1537 { 1538 1538 AudioControllerType_T audioController; 1539 hrc = audioAdapter->COMGETTER(AudioController)(&audioController); 1539 hrc = audioAdapter->COMGETTER(AudioController)(&audioController); H(); 1540 1540 switch (audioController) 1541 1541 { … … 1543 1543 { 1544 1544 /* default: ICH AC97 */ 1545 rc = CFGMR3InsertNode(pDevices, "ichac97", &pDev); 1545 rc = CFGMR3InsertNode(pDevices, "ichac97", &pDev); RC_CHECK(); 1546 1546 rc = CFGMR3InsertNode(pDev, "0", &pInst); 1547 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* bool ean */RC_CHECK();1548 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 5); 1547 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* bool */ RC_CHECK(); 1548 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 5); RC_CHECK(); 1549 1549 Assert(!afPciDeviceNo[5]); 1550 1550 afPciDeviceNo[5] = true; 1551 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); 1552 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); 1551 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK(); 1552 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 1553 1553 break; 1554 1554 } … … 1556 1556 { 1557 1557 /* legacy SoundBlaster16 */ 1558 rc = CFGMR3InsertNode(pDevices, "sb16", &pDev); 1559 rc = CFGMR3InsertNode(pDev, "0", &pInst); 1560 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* bool ean */RC_CHECK();1561 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); 1562 rc = CFGMR3InsertInteger(pCfg, "IRQ", 5); 1563 rc = CFGMR3InsertInteger(pCfg, "DMA", 1); 1564 rc = CFGMR3InsertInteger(pCfg, "DMA16", 5); 1565 rc = CFGMR3InsertInteger(pCfg, "Port", 0x220); 1566 rc = CFGMR3InsertInteger(pCfg, "Version", 0x0405); 1558 rc = CFGMR3InsertNode(pDevices, "sb16", &pDev); RC_CHECK(); 1559 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 1560 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* bool */ RC_CHECK(); 1561 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 1562 rc = CFGMR3InsertInteger(pCfg, "IRQ", 5); RC_CHECK(); 1563 rc = CFGMR3InsertInteger(pCfg, "DMA", 1); RC_CHECK(); 1564 rc = CFGMR3InsertInteger(pCfg, "DMA16", 5); RC_CHECK(); 1565 rc = CFGMR3InsertInteger(pCfg, "Port", 0x220); RC_CHECK(); 1566 rc = CFGMR3InsertInteger(pCfg, "Version", 0x0405); RC_CHECK(); 1567 1567 break; 1568 1568 } … … 1570 1570 1571 1571 /* the Audio driver */ 1572 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); 1573 rc = CFGMR3InsertString(pLunL0, "Driver", "AUDIO"); 1574 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); 1572 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK(); 1573 rc = CFGMR3InsertString(pLunL0, "Driver", "AUDIO"); RC_CHECK(); 1574 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1575 1575 1576 1576 AudioDriverType_T audioDriver; 1577 hrc = audioAdapter->COMGETTER(AudioDriver)(&audioDriver); 1577 hrc = audioAdapter->COMGETTER(AudioDriver)(&audioDriver); H(); 1578 1578 switch (audioDriver) 1579 1579 { 1580 1580 case AudioDriverType_Null: 1581 1581 { 1582 rc = CFGMR3InsertString(pCfg, "AudioDriver", "null"); 1582 rc = CFGMR3InsertString(pCfg, "AudioDriver", "null"); RC_CHECK(); 1583 1583 break; 1584 1584 } … … 1587 1587 case AudioDriverType_WinMM: 1588 1588 { 1589 rc = CFGMR3InsertString(pCfg, "AudioDriver", "winmm"); 1589 rc = CFGMR3InsertString(pCfg, "AudioDriver", "winmm"); RC_CHECK(); 1590 1590 break; 1591 1591 } … … 1593 1593 case AudioDriverType_DirectSound: 1594 1594 { 1595 rc = CFGMR3InsertString(pCfg, "AudioDriver", "dsound"); 1595 rc = CFGMR3InsertString(pCfg, "AudioDriver", "dsound"); RC_CHECK(); 1596 1596 break; 1597 1597 } … … 1600 1600 case AudioDriverType_SolAudio: 1601 1601 { 1602 rc = CFGMR3InsertString(pCfg, "AudioDriver", "solaudio"); 1602 rc = CFGMR3InsertString(pCfg, "AudioDriver", "solaudio"); RC_CHECK(); 1603 1603 break; 1604 1604 } … … 1607 1607 case AudioDriverType_OSS: 1608 1608 { 1609 rc = CFGMR3InsertString(pCfg, "AudioDriver", "oss"); 1609 rc = CFGMR3InsertString(pCfg, "AudioDriver", "oss"); RC_CHECK(); 1610 1610 break; 1611 1611 } … … 1613 1613 case AudioDriverType_ALSA: 1614 1614 { 1615 rc = CFGMR3InsertString(pCfg, "AudioDriver", "alsa"); 1615 rc = CFGMR3InsertString(pCfg, "AudioDriver", "alsa"); RC_CHECK(); 1616 1616 break; 1617 1617 } … … 1620 1620 case AudioDriverType_Pulse: 1621 1621 { 1622 rc = CFGMR3InsertString(pCfg, "AudioDriver", "pulse"); 1622 rc = CFGMR3InsertString(pCfg, "AudioDriver", "pulse"); RC_CHECK(); 1623 1623 break; 1624 1624 } … … 1628 1628 case AudioDriverType_CoreAudio: 1629 1629 { 1630 rc = CFGMR3InsertString(pCfg, "AudioDriver", "coreaudio"); 1630 rc = CFGMR3InsertString(pCfg, "AudioDriver", "coreaudio"); RC_CHECK(); 1631 1631 break; 1632 1632 } 1633 1633 #endif 1634 1634 } 1635 hrc = pMachine->COMGETTER(Name)(&str); 1635 hrc = pMachine->COMGETTER(Name)(&str); H(); 1636 1636 STR_CONV(); 1637 rc = CFGMR3InsertString(pCfg, "StreamName", psz); 1637 rc = CFGMR3InsertString(pCfg, "StreamName", psz); RC_CHECK(); 1638 1638 STR_FREE(); 1639 1639 } … … 1647 1647 { 1648 1648 BOOL fEnabled; 1649 hrc = USBCtlPtr->COMGETTER(Enabled)(&fEnabled); 1649 hrc = USBCtlPtr->COMGETTER(Enabled)(&fEnabled); H(); 1650 1650 if (fEnabled) 1651 1651 { 1652 rc = CFGMR3InsertNode(pDevices, "usb-ohci", &pDev); 1653 rc = CFGMR3InsertNode(pDev, "0", &pInst); 1654 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); 1652 rc = CFGMR3InsertNode(pDevices, "usb-ohci", &pDev); RC_CHECK(); 1653 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 1654 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 1655 1655 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* boolean */ RC_CHECK(); 1656 1656 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 6); RC_CHECK(); … … 1677 1677 if (fEnabled) 1678 1678 { 1679 rc = CFGMR3InsertNode(pDevices, "usb-ehci", &pDev); 1680 rc = CFGMR3InsertNode(pDev, "0", &pInst); 1681 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); 1682 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* bool ean */RC_CHECK();1683 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 11); 1679 rc = CFGMR3InsertNode(pDevices, "usb-ehci", &pDev); RC_CHECK(); 1680 rc = CFGMR3InsertNode(pDev, "0", &pInst); RC_CHECK(); 1681 rc = CFGMR3InsertNode(pInst, "Config", &pCfg); RC_CHECK(); 1682 rc = CFGMR3InsertInteger(pInst, "Trusted", 1); /* bool */ RC_CHECK(); 1683 rc = CFGMR3InsertInteger(pInst, "PCIDeviceNo", 11); RC_CHECK(); 1684 1684 Assert(!afPciDeviceNo[11]); 1685 1685 afPciDeviceNo[11] = true; 1686 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); 1687 1688 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); 1689 rc = CFGMR3InsertString(pLunL0, "Driver", "VUSBRootHub"); 1690 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); 1686 rc = CFGMR3InsertInteger(pInst, "PCIFunctionNo", 0); RC_CHECK(); 1687 1688 rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0); RC_CHECK(); 1689 rc = CFGMR3InsertString(pLunL0, "Driver", "VUSBRootHub"); RC_CHECK(); 1690 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1691 1691 1692 1692 /* 1693 1693 * Attach the status driver. 1694 1694 */ 1695 rc = CFGMR3InsertNode(pInst, "LUN#999", &pLunL0); 1696 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); 1697 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); 1695 rc = CFGMR3InsertNode(pInst, "LUN#999", &pLunL0); RC_CHECK(); 1696 rc = CFGMR3InsertString(pLunL0, "Driver", "MainStatus"); RC_CHECK(); 1697 rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); RC_CHECK(); 1698 1698 rc = CFGMR3InsertInteger(pCfg, "papLeds", (uintptr_t)&pConsole->mapUSBLed[1]);RC_CHECK(); 1699 rc = CFGMR3InsertInteger(pCfg, "First", 0); 1700 rc = CFGMR3InsertInteger(pCfg, "Last", 0); 1699 rc = CFGMR3InsertInteger(pCfg, "First", 0); RC_CHECK(); 1700 rc = CFGMR3InsertInteger(pCfg, "Last", 0); RC_CHECK(); 1701 1701 } 1702 1702 else … … 1707 1707 * on a per device level now. 1708 1708 */ 1709 rc = CFGMR3InsertNode(pRoot, "USB", &pCfg); 1710 rc = CFGMR3InsertNode(pCfg, "USBProxy", &pCfg); 1711 rc = CFGMR3InsertNode(pCfg, "GlobalConfig", &pCfg); 1709 rc = CFGMR3InsertNode(pRoot, "USB", &pCfg); RC_CHECK(); 1710 rc = CFGMR3InsertNode(pCfg, "USBProxy", &pCfg); RC_CHECK(); 1711 rc = CFGMR3InsertNode(pCfg, "GlobalConfig", &pCfg); RC_CHECK(); 1712 1712 // This globally enables the 2.0 -> 1.1 device morphing of proxied devies to keep windows quiet. 1713 //rc = CFGMR3InsertInteger(pCfg, "Force11Device", true); 1713 //rc = CFGMR3InsertInteger(pCfg, "Force11Device", true); RC_CHECK(); 1714 1714 // The following breaks stuff, but it makes MSDs work in vista. (I include it here so 1715 1715 // that it's documented somewhere.) Users needing it can use: 1716 1716 // VBoxManage setextradata "myvm" "VBoxInternal/USB/USBProxy/GlobalConfig/Force11PacketSize" 1 1717 //rc = CFGMR3InsertInteger(pCfg, "Force11PacketSize", true); 1717 //rc = CFGMR3InsertInteger(pCfg, "Force11PacketSize", true); RC_CHECK(); 1718 1718 } 1719 1719 } … … 1809 1809 ComSafeArrayAsOutParam(values), 1810 1810 ComSafeArrayAsOutParam(timestamps), 1811 ComSafeArrayAsOutParam(flags)); 1811 ComSafeArrayAsOutParam(flags)); H(); 1812 1812 size_t cProps = names.size(); 1813 1813 for (size_t i = 0; i < cProps; ++i)
Note:
See TracChangeset
for help on using the changeset viewer.