Changeset 45674 in vbox for trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
- Timestamp:
- Apr 23, 2013 8:45:54 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r44948 r45674 72 72 MODIFYVM_DELCPUID, 73 73 MODIFYVM_DELALLCPUID, 74 MODIFYVM_GRAPHICSCONTROLLER, 74 75 MODIFYVM_MONITORCOUNT, 75 76 MODIFYVM_ACCELERATE3D, … … 228 229 { "--cpuexecutioncap", MODIFYVM_CPU_EXECTUION_CAP, RTGETOPT_REQ_UINT32 }, 229 230 { "--rtcuseutc", MODIFYVM_RTCUSEUTC, RTGETOPT_REQ_BOOL_ONOFF }, 231 { "--graphicscontroller", MODIFYVM_GRAPHICSCONTROLLER, RTGETOPT_REQ_STRING }, 230 232 { "--monitorcount", MODIFYVM_MONITORCOUNT, RTGETOPT_REQ_UINT32 }, 231 233 { "--accelerate3d", MODIFYVM_ACCELERATE3D, RTGETOPT_REQ_BOOL_ONOFF }, … … 488 490 case MODIFYVM_FIRMWARE: 489 491 { 490 if (! strcmp(ValueUnion.psz, "efi"))492 if (!RTStrICmp(ValueUnion.psz, "efi")) 491 493 { 492 494 CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI)); 493 495 } 494 else if (! strcmp(ValueUnion.psz, "efi32"))496 else if (!RTStrICmp(ValueUnion.psz, "efi32")) 495 497 { 496 498 CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI32)); 497 499 } 498 else if (! strcmp(ValueUnion.psz, "efi64"))500 else if (!RTStrICmp(ValueUnion.psz, "efi64")) 499 501 { 500 502 CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFI64)); 501 503 } 502 else if (! strcmp(ValueUnion.psz, "efidual"))504 else if (!RTStrICmp(ValueUnion.psz, "efidual")) 503 505 { 504 506 CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_EFIDUAL)); 505 507 } 506 else if (! strcmp(ValueUnion.psz, "bios"))508 else if (!RTStrICmp(ValueUnion.psz, "bios")) 507 509 { 508 510 CHECK_ERROR(machine, COMSETTER(FirmwareType)(FirmwareType_BIOS)); … … 636 638 } 637 639 640 case MODIFYVM_GRAPHICSCONTROLLER: 641 { 642 if ( !RTStrICmp(ValueUnion.psz, "none") 643 || !RTStrICmp(ValueUnion.psz, "disabled")) 644 CHECK_ERROR(machine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_Null)); 645 else if ( !RTStrICmp(ValueUnion.psz, "vboxvga") 646 || !RTStrICmp(ValueUnion.psz, "vbox") 647 || !RTStrICmp(ValueUnion.psz, "vga") 648 || !RTStrICmp(ValueUnion.psz, "vesa")) 649 CHECK_ERROR(machine, COMSETTER(GraphicsControllerType)(GraphicsControllerType_VBoxVGA)); 650 else 651 { 652 errorArgument("Invalid --graphicscontroller argument '%s'", ValueUnion.psz); 653 rc = E_FAIL; 654 } 655 break; 656 } 657 638 658 case MODIFYVM_MONITORCOUNT: 639 659 { … … 682 702 case MODIFYVM_BIOSBOOTMENU: 683 703 { 684 if (! strcmp(ValueUnion.psz, "disabled"))704 if (!RTStrICmp(ValueUnion.psz, "disabled")) 685 705 { 686 706 CHECK_ERROR(biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_Disabled)); 687 707 } 688 else if (! strcmp(ValueUnion.psz, "menuonly"))708 else if (!RTStrICmp(ValueUnion.psz, "menuonly")) 689 709 { 690 710 CHECK_ERROR(biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_MenuOnly)); 691 711 } 692 else if (! strcmp(ValueUnion.psz, "messageandmenu"))712 else if (!RTStrICmp(ValueUnion.psz, "messageandmenu")) 693 713 { 694 714 CHECK_ERROR(biosSettings, COMSETTER(BootMenuMode)(BIOSBootMenuMode_MessageAndMenu)); … … 716 736 case MODIFYVM_BOOT: 717 737 { 718 if (! strcmp(ValueUnion.psz, "none"))738 if (!RTStrICmp(ValueUnion.psz, "none")) 719 739 { 720 740 CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_Null)); 721 741 } 722 else if (! strcmp(ValueUnion.psz, "floppy"))742 else if (!RTStrICmp(ValueUnion.psz, "floppy")) 723 743 { 724 744 CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_Floppy)); 725 745 } 726 else if (! strcmp(ValueUnion.psz, "dvd"))746 else if (!RTStrICmp(ValueUnion.psz, "dvd")) 727 747 { 728 748 CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_DVD)); 729 749 } 730 else if (! strcmp(ValueUnion.psz, "disk"))750 else if (!RTStrICmp(ValueUnion.psz, "disk")) 731 751 { 732 752 CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_HardDisk)); 733 753 } 734 else if (! strcmp(ValueUnion.psz, "net"))754 else if (!RTStrICmp(ValueUnion.psz, "net")) 735 755 { 736 756 CHECK_ERROR(machine, SetBootOrder(GetOptState.uIndex, DeviceType_Network)); … … 771 791 } 772 792 773 if (! strcmp(ValueUnion.psz, "none"))793 if (!RTStrICmp(ValueUnion.psz, "none")) 774 794 { 775 795 machine->DetachDevice(bstrController.raw(), u1, u2); … … 836 856 case MODIFYVM_SATA: // deprecated 837 857 { 838 if (! strcmp(ValueUnion.psz, "on") || !strcmp(ValueUnion.psz, "enable"))858 if (!RTStrICmp(ValueUnion.psz, "on") || !RTStrICmp(ValueUnion.psz, "enable")) 839 859 { 840 860 ComPtr<IStorageController> ctl; … … 844 864 CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_IntelAhci)); 845 865 } 846 else if (! strcmp(ValueUnion.psz, "off") || !strcmp(ValueUnion.psz, "disable"))866 else if (!RTStrICmp(ValueUnion.psz, "off") || !RTStrICmp(ValueUnion.psz, "disable")) 847 867 CHECK_ERROR(machine, RemoveStorageController(Bstr("SATA").raw())); 848 868 else … … 853 873 case MODIFYVM_SCSIPORT: // deprecated 854 874 { 855 if (! strcmp(ValueUnion.psz, "none"))875 if (!RTStrICmp(ValueUnion.psz, "none")) 856 876 { 857 877 rc = machine->DetachDevice(Bstr("LsiLogic").raw(), … … 928 948 case MODIFYVM_SCSI: // deprecated 929 949 { 930 if (! strcmp(ValueUnion.psz, "on") || !strcmp(ValueUnion.psz, "enable"))950 if (!RTStrICmp(ValueUnion.psz, "on") || !RTStrICmp(ValueUnion.psz, "enable")) 931 951 { 932 952 ComPtr<IStorageController> ctl; … … 938 958 CHECK_ERROR(ctl, COMSETTER(ControllerType)(StorageControllerType_BusLogic)); 939 959 } 940 else if (! strcmp(ValueUnion.psz, "off") || !strcmp(ValueUnion.psz, "disable"))960 else if (!RTStrICmp(ValueUnion.psz, "off") || !RTStrICmp(ValueUnion.psz, "disable")) 941 961 { 942 962 rc = machine->RemoveStorageController(Bstr("BusLogic").raw()); … … 951 971 CHECK_ERROR(machine, PassthroughDevice(Bstr("IDE Controller").raw(), 952 972 1, 0, 953 ! strcmp(ValueUnion.psz, "on")));973 !RTStrICmp(ValueUnion.psz, "on"))); 954 974 break; 955 975 } … … 960 980 961 981 /* unmount? */ 962 if (! strcmp(ValueUnion.psz, "none"))982 if (!RTStrICmp(ValueUnion.psz, "none")) 963 983 { 964 984 /* nothing to do, NULL object will cause unmount */ 965 985 } 966 986 /* host drive? */ 967 else if (! strncmp(ValueUnion.psz, "host:", 5))987 else if (!RTStrNICmp(ValueUnion.psz, "host:", 5)) 968 988 { 969 989 ComPtr<IHost> host; … … 1021 1041 1022 1042 /* disable? */ 1023 if (! strcmp(ValueUnion.psz, "disabled"))1043 if (!RTStrICmp(ValueUnion.psz, "disabled")) 1024 1044 { 1025 1045 /* disable the controller */ … … 1037 1057 1038 1058 /* unmount? */ 1039 if ( ! strcmp(ValueUnion.psz, "none")1040 || ! strcmp(ValueUnion.psz, "empty")) // deprecated1059 if ( !RTStrICmp(ValueUnion.psz, "none") 1060 || !RTStrICmp(ValueUnion.psz, "empty")) // deprecated 1041 1061 { 1042 1062 /* nothing to do, NULL object will cause unmount */ 1043 1063 } 1044 1064 /* host drive? */ 1045 else if (! strncmp(ValueUnion.psz, "host:", 5))1065 else if (!RTStrNICmp(ValueUnion.psz, "host:", 5)) 1046 1066 { 1047 1067 ComPtr<IHost> host; … … 1144 1164 ASSERT(nic); 1145 1165 1146 if (! strcmp(ValueUnion.psz, "Am79C970A"))1166 if (!RTStrICmp(ValueUnion.psz, "Am79C970A")) 1147 1167 { 1148 1168 CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_Am79C970A)); 1149 1169 } 1150 else if (! strcmp(ValueUnion.psz, "Am79C973"))1170 else if (!RTStrICmp(ValueUnion.psz, "Am79C973")) 1151 1171 { 1152 1172 CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_Am79C973)); 1153 1173 } 1154 1174 #ifdef VBOX_WITH_E1000 1155 else if (! strcmp(ValueUnion.psz, "82540EM"))1175 else if (!RTStrICmp(ValueUnion.psz, "82540EM")) 1156 1176 { 1157 1177 CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82540EM)); 1158 1178 } 1159 else if (! strcmp(ValueUnion.psz, "82543GC"))1179 else if (!RTStrICmp(ValueUnion.psz, "82543GC")) 1160 1180 { 1161 1181 CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82543GC)); 1162 1182 } 1163 else if (! strcmp(ValueUnion.psz, "82545EM"))1183 else if (!RTStrICmp(ValueUnion.psz, "82545EM")) 1164 1184 { 1165 1185 CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_I82545EM)); … … 1167 1187 #endif 1168 1188 #ifdef VBOX_WITH_VIRTIO 1169 else if (! strcmp(ValueUnion.psz, "virtio"))1189 else if (!RTStrICmp(ValueUnion.psz, "virtio")) 1170 1190 { 1171 1191 CHECK_ERROR(nic, COMSETTER(AdapterType)(NetworkAdapterType_Virtio)); … … 1217 1237 { 1218 1238 NetworkAdapterPromiscModePolicy_T enmPromiscModePolicy; 1219 if (! strcmp(ValueUnion.psz, "deny"))1239 if (!RTStrICmp(ValueUnion.psz, "deny")) 1220 1240 enmPromiscModePolicy = NetworkAdapterPromiscModePolicy_Deny; 1221 else if ( ! strcmp(ValueUnion.psz, "allow-vms")1222 || ! strcmp(ValueUnion.psz, "allow-network"))1241 else if ( !RTStrICmp(ValueUnion.psz, "allow-vms") 1242 || !RTStrICmp(ValueUnion.psz, "allow-network")) 1223 1243 enmPromiscModePolicy = NetworkAdapterPromiscModePolicy_AllowNetwork; 1224 else if (! strcmp(ValueUnion.psz, "allow-all"))1244 else if (!RTStrICmp(ValueUnion.psz, "allow-all")) 1225 1245 enmPromiscModePolicy = NetworkAdapterPromiscModePolicy_AllowAll; 1226 1246 else … … 1276 1296 ASSERT(nic); 1277 1297 1278 if (! strcmp(ValueUnion.psz, "none"))1298 if (!RTStrICmp(ValueUnion.psz, "none")) 1279 1299 { 1280 1300 CHECK_ERROR(nic, COMSETTER(Enabled)(FALSE)); 1281 1301 } 1282 else if (! strcmp(ValueUnion.psz, "null"))1302 else if (!RTStrICmp(ValueUnion.psz, "null")) 1283 1303 { 1284 1304 CHECK_ERROR(nic, COMSETTER(Enabled)(TRUE)); 1285 1305 CHECK_ERROR(nic, COMSETTER(AttachmentType)(NetworkAttachmentType_Null)); 1286 1306 } 1287 else if (! strcmp(ValueUnion.psz, "nat"))1307 else if (!RTStrICmp(ValueUnion.psz, "nat")) 1288 1308 { 1289 1309 CHECK_ERROR(nic, COMSETTER(Enabled)(TRUE)); 1290 1310 CHECK_ERROR(nic, COMSETTER(AttachmentType)(NetworkAttachmentType_NAT)); 1291 1311 } 1292 else if ( ! strcmp(ValueUnion.psz, "bridged")1293 || ! strcmp(ValueUnion.psz, "hostif")) /* backward compatibility */1312 else if ( !RTStrICmp(ValueUnion.psz, "bridged") 1313 || !RTStrICmp(ValueUnion.psz, "hostif")) /* backward compatibility */ 1294 1314 { 1295 1315 CHECK_ERROR(nic, COMSETTER(Enabled)(TRUE)); 1296 1316 CHECK_ERROR(nic, COMSETTER(AttachmentType)(NetworkAttachmentType_Bridged)); 1297 1317 } 1298 else if (! strcmp(ValueUnion.psz, "intnet"))1318 else if (!RTStrICmp(ValueUnion.psz, "intnet")) 1299 1319 { 1300 1320 CHECK_ERROR(nic, COMSETTER(Enabled)(TRUE)); 1301 1321 CHECK_ERROR(nic, COMSETTER(AttachmentType)(NetworkAttachmentType_Internal)); 1302 1322 } 1303 else if (! strcmp(ValueUnion.psz, "hostonly"))1323 else if (!RTStrICmp(ValueUnion.psz, "hostonly")) 1304 1324 { 1305 1325 … … 1307 1327 CHECK_ERROR(nic, COMSETTER(AttachmentType)(NetworkAttachmentType_HostOnly)); 1308 1328 } 1309 else if (! strcmp(ValueUnion.psz, "generic"))1329 else if (!RTStrICmp(ValueUnion.psz, "generic")) 1310 1330 { 1311 1331 … … 1340 1360 1341 1361 /* remove it? */ 1342 if (! strcmp(ValueUnion.psz, "none"))1362 if (!RTStrICmp(ValueUnion.psz, "none")) 1343 1363 { 1344 1364 CHECK_ERROR(nic, COMSETTER(BridgedInterface)(Bstr().raw())); … … 1359 1379 1360 1380 /* remove it? */ 1361 if (! strcmp(ValueUnion.psz, "none"))1381 if (!RTStrICmp(ValueUnion.psz, "none")) 1362 1382 { 1363 1383 CHECK_ERROR(nic, COMSETTER(HostOnlyInterface)(Bstr().raw())); … … 1378 1398 1379 1399 /* remove it? */ 1380 if (! strcmp(ValueUnion.psz, "none"))1400 if (!RTStrICmp(ValueUnion.psz, "none")) 1381 1401 { 1382 1402 CHECK_ERROR(nic, COMSETTER(InternalNetwork)(Bstr().raw())); … … 1411 1431 1412 1432 const char *psz = ValueUnion.psz; 1413 if (! strcmp("default", psz))1433 if (!RTStrICmp("default", psz)) 1414 1434 psz = ""; 1415 1435 … … 1657 1677 1658 1678 /* generate one? */ 1659 if (! strcmp(ValueUnion.psz, "auto"))1679 if (!RTStrICmp(ValueUnion.psz, "auto")) 1660 1680 { 1661 1681 CHECK_ERROR(nic, COMSETTER(MACAddress)(Bstr().raw())); … … 1671 1691 { 1672 1692 bool fEnableUsb = false; 1673 if (! strcmp(ValueUnion.psz, "ps2"))1693 if (!RTStrICmp(ValueUnion.psz, "ps2")) 1674 1694 { 1675 1695 CHECK_ERROR(machine, COMSETTER(PointingHIDType)(PointingHIDType_PS2Mouse)); 1676 1696 } 1677 else if (! strcmp(ValueUnion.psz, "usb"))1697 else if (!RTStrICmp(ValueUnion.psz, "usb")) 1678 1698 { 1679 1699 CHECK_ERROR(machine, COMSETTER(PointingHIDType)(PointingHIDType_USBMouse)); … … 1681 1701 fEnableUsb = true; 1682 1702 } 1683 else if (! strcmp(ValueUnion.psz, "usbtablet"))1703 else if (!RTStrICmp(ValueUnion.psz, "usbtablet")) 1684 1704 { 1685 1705 CHECK_ERROR(machine, COMSETTER(PointingHIDType)(PointingHIDType_USBTablet)); … … 1713 1733 { 1714 1734 bool fEnableUsb = false; 1715 if (! strcmp(ValueUnion.psz, "ps2"))1735 if (!RTStrICmp(ValueUnion.psz, "ps2")) 1716 1736 { 1717 1737 CHECK_ERROR(machine, COMSETTER(KeyboardHIDType)(KeyboardHIDType_PS2Keyboard)); 1718 1738 } 1719 else if (! strcmp(ValueUnion.psz, "usb"))1739 else if (!RTStrICmp(ValueUnion.psz, "usb")) 1720 1740 { 1721 1741 CHECK_ERROR(machine, COMSETTER(KeyboardHIDType)(KeyboardHIDType_USBKeyboard)); … … 1754 1774 ASSERT(uart); 1755 1775 1756 if (! strcmp(ValueUnion.psz, "disconnected"))1776 if (!RTStrICmp(ValueUnion.psz, "disconnected")) 1757 1777 { 1758 1778 CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_Disconnected)); 1759 1779 } 1760 else if ( ! strcmp(ValueUnion.psz, "server")1761 || ! strcmp(ValueUnion.psz, "client")1762 || ! strcmp(ValueUnion.psz, "file"))1780 else if ( !RTStrICmp(ValueUnion.psz, "server") 1781 || !RTStrICmp(ValueUnion.psz, "client") 1782 || !RTStrICmp(ValueUnion.psz, "file")) 1763 1783 { 1764 1784 const char *pszMode = ValueUnion.psz; … … 1772 1792 CHECK_ERROR(uart, COMSETTER(Path)(Bstr(ValueUnion.psz).raw())); 1773 1793 1774 if (! strcmp(pszMode, "server"))1794 if (!RTStrICmp(pszMode, "server")) 1775 1795 { 1776 1796 CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostPipe)); 1777 1797 CHECK_ERROR(uart, COMSETTER(Server)(TRUE)); 1778 1798 } 1779 else if (! strcmp(pszMode, "client"))1799 else if (!RTStrICmp(pszMode, "client")) 1780 1800 { 1781 1801 CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_HostPipe)); 1782 1802 CHECK_ERROR(uart, COMSETTER(Server)(FALSE)); 1783 1803 } 1784 else if (! strcmp(pszMode, "file"))1804 else if (!RTStrICmp(pszMode, "file")) 1785 1805 { 1786 1806 CHECK_ERROR(uart, COMSETTER(HostMode)(PortMode_RawFile)); … … 1802 1822 ASSERT(uart); 1803 1823 1804 if (! strcmp(ValueUnion.psz, "off") || !strcmp(ValueUnion.psz, "disable"))1824 if (!RTStrICmp(ValueUnion.psz, "off") || !RTStrICmp(ValueUnion.psz, "disable")) 1805 1825 CHECK_ERROR(uart, COMSETTER(Enabled)(FALSE)); 1806 1826 else … … 1847 1867 ASSERT(lpt); 1848 1868 1849 if (! strcmp(ValueUnion.psz, "off") || !strcmp(ValueUnion.psz, "disable"))1869 if (!RTStrICmp(ValueUnion.psz, "off") || !RTStrICmp(ValueUnion.psz, "disable")) 1850 1870 CHECK_ERROR(lpt, COMSETTER(Enabled)(FALSE)); 1851 1871 else … … 1885 1905 ASSERT(audioAdapter); 1886 1906 1887 if (! strcmp(ValueUnion.psz, "sb16"))1907 if (!RTStrICmp(ValueUnion.psz, "sb16")) 1888 1908 CHECK_ERROR(audioAdapter, COMSETTER(AudioController)(AudioControllerType_SB16)); 1889 else if (! strcmp(ValueUnion.psz, "ac97"))1909 else if (!RTStrICmp(ValueUnion.psz, "ac97")) 1890 1910 CHECK_ERROR(audioAdapter, COMSETTER(AudioController)(AudioControllerType_AC97)); 1891 else if (! strcmp(ValueUnion.psz, "hda"))1911 else if (!RTStrICmp(ValueUnion.psz, "hda")) 1892 1912 CHECK_ERROR(audioAdapter, COMSETTER(AudioController)(AudioControllerType_HDA)); 1893 1913 else … … 1906 1926 1907 1927 /* disable? */ 1908 if (! strcmp(ValueUnion.psz, "none"))1928 if (!RTStrICmp(ValueUnion.psz, "none")) 1909 1929 { 1910 1930 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(false)); 1911 1931 } 1912 else if (! strcmp(ValueUnion.psz, "null"))1932 else if (!RTStrICmp(ValueUnion.psz, "null")) 1913 1933 { 1914 1934 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Null)); … … 1917 1937 #ifdef RT_OS_WINDOWS 1918 1938 #ifdef VBOX_WITH_WINMM 1919 else if (! strcmp(ValueUnion.psz, "winmm"))1939 else if (!RTStrICmp(ValueUnion.psz, "winmm")) 1920 1940 { 1921 1941 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_WinMM)); … … 1923 1943 } 1924 1944 #endif 1925 else if (! strcmp(ValueUnion.psz, "dsound"))1945 else if (!RTStrICmp(ValueUnion.psz, "dsound")) 1926 1946 { 1927 1947 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_DirectSound)); … … 1931 1951 #ifdef RT_OS_LINUX 1932 1952 # ifdef VBOX_WITH_ALSA 1933 else if (! strcmp(ValueUnion.psz, "alsa"))1953 else if (!RTStrICmp(ValueUnion.psz, "alsa")) 1934 1954 { 1935 1955 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_ALSA)); … … 1938 1958 # endif 1939 1959 # ifdef VBOX_WITH_PULSE 1940 else if (! strcmp(ValueUnion.psz, "pulse"))1960 else if (!RTStrICmp(ValueUnion.psz, "pulse")) 1941 1961 { 1942 1962 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Pulse)); … … 1946 1966 #endif /* !RT_OS_LINUX */ 1947 1967 #ifdef RT_OS_SOLARIS 1948 else if (! strcmp(ValueUnion.psz, "solaudio"))1968 else if (!RTStrICmp(ValueUnion.psz, "solaudio")) 1949 1969 { 1950 1970 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_SolAudio)); … … 1953 1973 #endif /* !RT_OS_SOLARIS */ 1954 1974 #ifdef RT_OS_FREEBSD 1955 else if (! strcmp(ValueUnion.psz, "oss"))1975 else if (!RTStrICmp(ValueUnion.psz, "oss")) 1956 1976 { 1957 1977 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS)); … … 1959 1979 } 1960 1980 # ifdef VBOX_WITH_PULSE 1961 else if (! strcmp(ValueUnion.psz, "pulse"))1981 else if (!RTStrICmp(ValueUnion.psz, "pulse")) 1962 1982 { 1963 1983 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_Pulse)); … … 1967 1987 #endif /* !RT_OS_FREEBSD */ 1968 1988 #ifdef RT_OS_DARWIN 1969 else if (! strcmp(ValueUnion.psz, "coreaudio"))1989 else if (!RTStrICmp(ValueUnion.psz, "coreaudio")) 1970 1990 { 1971 1991 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_CoreAudio)); … … 1975 1995 #endif /* !RT_OS_DARWIN */ 1976 1996 # if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(VBOX_WITH_SOLARIS_OSS) 1977 else if (! strcmp(ValueUnion.psz, "oss"))1997 else if (!RTStrICmp(ValueUnion.psz, "oss")) 1978 1998 { 1979 1999 CHECK_ERROR(audioAdapter, COMSETTER(AudioDriver)(AudioDriverType_OSS)); … … 1992 2012 { 1993 2013 ClipboardMode_T mode; 1994 if (! strcmp(ValueUnion.psz, "disabled"))2014 if (!RTStrICmp(ValueUnion.psz, "disabled")) 1995 2015 mode = ClipboardMode_Disabled; 1996 else if (! strcmp(ValueUnion.psz, "hosttoguest"))2016 else if (!RTStrICmp(ValueUnion.psz, "hosttoguest")) 1997 2017 mode = ClipboardMode_HostToGuest; 1998 else if (! strcmp(ValueUnion.psz, "guesttohost"))2018 else if (!RTStrICmp(ValueUnion.psz, "guesttohost")) 1999 2019 mode = ClipboardMode_GuestToHost; 2000 else if (! strcmp(ValueUnion.psz, "bidirectional"))2020 else if (!RTStrICmp(ValueUnion.psz, "bidirectional")) 2001 2021 mode = ClipboardMode_Bidirectional; 2002 2022 else … … 2015 2035 { 2016 2036 DragAndDropMode_T mode; 2017 if (! strcmp(ValueUnion.psz, "disabled"))2037 if (!RTStrICmp(ValueUnion.psz, "disabled")) 2018 2038 mode = DragAndDropMode_Disabled; 2019 else if (! strcmp(ValueUnion.psz, "hosttoguest"))2039 else if (!RTStrICmp(ValueUnion.psz, "hosttoguest")) 2020 2040 mode = DragAndDropMode_HostToGuest; 2021 else if (! strcmp(ValueUnion.psz, "guesttohost"))2041 else if (!RTStrICmp(ValueUnion.psz, "guesttohost")) 2022 2042 mode = DragAndDropMode_GuestToHost; 2023 else if (! strcmp(ValueUnion.psz, "bidirectional"))2043 else if (!RTStrICmp(ValueUnion.psz, "bidirectional")) 2024 2044 mode = DragAndDropMode_Bidirectional; 2025 2045 else … … 2043 2063 if (vrdeServer) 2044 2064 { 2045 if ( strcmp(ValueUnion.psz, "default") != 0)2065 if (RTStrICmp(ValueUnion.psz, "default") != 0) 2046 2066 { 2047 2067 Bstr bstr(ValueUnion.psz); … … 2103 2123 ASSERT(vrdeServer); 2104 2124 2105 if (! strcmp(ValueUnion.psz, "default"))2125 if (!RTStrICmp(ValueUnion.psz, "default")) 2106 2126 CHECK_ERROR(vrdeServer, SetVRDEProperty(Bstr("TCP/Ports").raw(), Bstr("0").raw())); 2107 2127 else … … 2131 2151 ASSERT(vrdeServer); 2132 2152 2133 if (! strcmp(ValueUnion.psz, "null"))2153 if (!RTStrICmp(ValueUnion.psz, "null")) 2134 2154 { 2135 2155 CHECK_ERROR(vrdeServer, COMSETTER(AuthType)(AuthType_Null)); 2136 2156 } 2137 else if (! strcmp(ValueUnion.psz, "external"))2157 else if (!RTStrICmp(ValueUnion.psz, "external")) 2138 2158 { 2139 2159 CHECK_ERROR(vrdeServer, COMSETTER(AuthType)(AuthType_External)); 2140 2160 } 2141 else if (! strcmp(ValueUnion.psz, "guest"))2161 else if (!RTStrICmp(ValueUnion.psz, "guest")) 2142 2162 { 2143 2163 CHECK_ERROR(vrdeServer, COMSETTER(AuthType)(AuthType_Guest)); … … 2159 2179 if (vrdeServer) 2160 2180 { 2161 if ( strcmp(ValueUnion.psz, "default") != 0)2181 if (RTStrICmp(ValueUnion.psz, "default") != 0) 2162 2182 { 2163 2183 Bstr bstr(ValueUnion.psz); … … 2252 2272 case MODIFYVM_SNAPSHOTFOLDER: 2253 2273 { 2254 if (! strcmp(ValueUnion.psz, "default"))2274 if (!RTStrICmp(ValueUnion.psz, "default")) 2255 2275 CHECK_ERROR(machine, COMSETTER(SnapshotFolder)(Bstr().raw())); 2256 2276 else … … 2314 2334 case MODIFYVM_FAULT_TOLERANCE: 2315 2335 { 2316 if (! strcmp(ValueUnion.psz, "master"))2336 if (!RTStrICmp(ValueUnion.psz, "master")) 2317 2337 { 2318 2338 CHECK_ERROR(machine, COMSETTER(FaultToleranceState(FaultToleranceState_Master))); 2319 2339 } 2320 2340 else 2321 if (! strcmp(ValueUnion.psz, "standby"))2341 if (!RTStrICmp(ValueUnion.psz, "standby")) 2322 2342 { 2323 2343 CHECK_ERROR(machine, COMSETTER(FaultToleranceState(FaultToleranceState_Standby))); … … 2381 2401 case MODIFYVM_CHIPSET: 2382 2402 { 2383 if (! strcmp(ValueUnion.psz, "piix3"))2403 if (!RTStrICmp(ValueUnion.psz, "piix3")) 2384 2404 { 2385 2405 CHECK_ERROR(machine, COMSETTER(ChipsetType)(ChipsetType_PIIX3)); 2386 2406 } 2387 else if (! strcmp(ValueUnion.psz, "ich9"))2407 else if (!RTStrICmp(ValueUnion.psz, "ich9")) 2388 2408 { 2389 2409 CHECK_ERROR(machine, COMSETTER(ChipsetType)(ChipsetType_ICH9));
Note:
See TracChangeset
for help on using the changeset viewer.