Changeset 17939 in vbox
- Timestamp:
- Mar 16, 2009 2:28:53 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 44513
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk
r17882 r17939 40 40 $(if $(VBOX_WITH_E1000),VBOX_WITH_E1000) \ 41 41 $(if $(VBOX_WITH_AHCI), VBOX_WITH_AHCI) \ 42 $(if $(VBOX_WITH_ AHCI), VBOX_WITH_LSILOGIC) \42 $(if $(VBOX_WITH_SCSI), VBOX_WITH_SCSI) \ 43 43 $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS) \ 44 44 $(if $(VBOX_WITH_HOSTNETIF_API), VBOX_WITH_HOSTNETIF_API) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r17886 r17939 158 158 " [-sataideemulation<1-4> <1-30>]\n" 159 159 #endif 160 #ifdef VBOX_WITH_LSILOGIC 161 " [-lsilogic on|off]\n" 162 " [-lsilogicport<1-16> none|<uuid>|<filename>]\n" 160 #ifdef VBOX_WITH_SCSI 161 " [-scsi on|off]\n" 162 " [-scsiport<1-16> none|<uuid>|<filename>]\n" 163 " [-scsitype LsiLogic|BusLogic]\n" 163 164 #endif 164 165 " [-dvd none|<uuid>|<filename>|host:<drive>]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r17843 r17939 100 100 ULONG guestStatInterval = (ULONG)-1; 101 101 int fSataEnabled = -1; 102 int fLsiLogicEnabled = -1; 102 int fScsiEnabled = -1; 103 int fScsiLsiLogic = -1; 103 104 int sataPortCount = -1; 104 105 int sataBootDevices[4] = {-1,-1,-1,-1}; … … 734 735 sataBootDevices[bootDevicePos] = n-1; 735 736 } 736 else if (strcmp(a->argv[i], "- lsilogic") == 0)737 else if (strcmp(a->argv[i], "-scsi") == 0) 737 738 { 738 739 if (a->argc <= i + 1) … … 740 741 i++; 741 742 if (strcmp(a->argv[i], "on") == 0 || strcmp(a->argv[i], "enable") == 0) 742 f LsiLogicEnabled = 1;743 fScsiEnabled = 1; 743 744 else if (strcmp(a->argv[i], "off") == 0 || strcmp(a->argv[i], "disable") == 0) 744 f LsiLogicEnabled = 0;745 else 746 return errorArgument("Invalid - lsilogicargument '%s'", a->argv[i]);747 } 748 else if (strncmp(a->argv[i], "- lsilogicport", 13) == 0)749 { 750 unsigned n = parseNum(&a->argv[i][ 13], 16, "LsiLogic");745 fScsiEnabled = 0; 746 else 747 return errorArgument("Invalid -scsi argument '%s'", a->argv[i]); 748 } 749 else if (strncmp(a->argv[i], "-scsiport", 9) == 0) 750 { 751 unsigned n = parseNum(&a->argv[i][9], 16, "SCSI"); 751 752 if (!n) 752 753 return 1; … … 755 756 i++; 756 757 hdds[n-1+34] = a->argv[i]; 758 } 759 else if (strcmp(a->argv[i], "-scsitype") == 0) 760 { 761 if (a->argc <= i + 1) 762 return errorArgument("Missing argument to '%s'", a->argv[i]); 763 i++; 764 if (strcmp(a->argv[i], "LsiLogic") == 0 ) 765 fScsiLsiLogic = 1; 766 else if (strcmp(a->argv[i], "BusLogic") == 0) 767 fScsiLsiLogic = 0; 768 else 769 return errorArgument("Invalid -scsitype argument '%s'", a->argv[i]); 757 770 } 758 771 else … … 1858 1871 1859 1872 /* 1860 * LsiLogiccontroller enable/disable1873 * SCSI controller enable/disable 1861 1874 */ 1862 if (f LsiLogicEnabled != -1)1863 { 1864 if (f LsiLogicEnabled)1875 if (fScsiEnabled != -1) 1876 { 1877 if (fScsiEnabled) 1865 1878 { 1866 1879 ComPtr<IStorageController> ctl; 1867 CHECK_ERROR(machine, AddStorageController(Bstr("LsiLogic"), StorageBus_SCSI, ctl.asOutParam())); 1868 CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_LsiLogic)); 1869 } 1870 else 1871 CHECK_ERROR(machine, RemoveStorageController(Bstr("LsiLogic"))); 1880 if (fScsiLsiLogic == 0) 1881 { 1882 CHECK_ERROR(machine, AddStorageController(Bstr("BusLogic"), StorageBus_SCSI, ctl.asOutParam())); 1883 CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic)); 1884 } 1885 else /* LsiLogic is default */ 1886 { 1887 CHECK_ERROR(machine, AddStorageController(Bstr("LsiLogic"), StorageBus_SCSI, ctl.asOutParam())); 1888 CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_LsiLogic)); 1889 } 1890 } 1891 else 1892 { 1893 rc = machine->RemoveStorageController(Bstr("LsiLogic")); 1894 if (!SUCCEEDED(rc)) 1895 CHECK_ERROR(machine, RemoveStorageController(Bstr("BusLogic"))); 1896 } 1872 1897 } 1873 1898 … … 1878 1903 if (strcmp(hdds[i], "none") == 0) 1879 1904 { 1880 machine->DetachHardDisk(Bstr("LsiLogic"), i-34, 0); 1905 rc = machine->DetachHardDisk(Bstr("LsiLogic"), i-34, 0); 1906 if (!SUCCEEDED(rc)) 1907 CHECK_ERROR(machine, DetachHardDisk(Bstr("BusLogic"), i-34, 0)); 1881 1908 } 1882 1909 else … … 1899 1926 { 1900 1927 hardDisk->COMGETTER(Id)(uuid.asOutParam()); 1901 CHECK_ERROR(machine, AttachHardDisk(uuid, Bstr("LsiLogic"), i-34, 0)); 1928 rc = machine->AttachHardDisk(uuid, Bstr("LsiLogic"), i-34, 0); 1929 if (!SUCCEEDED(rc)) 1930 CHECK_ERROR(machine, AttachHardDisk(uuid, Bstr("BusLogic"), i-34, 0)); 1902 1931 } 1903 1932 else
Note:
See TracChangeset
for help on using the changeset viewer.