Changeset 92223 in vbox
- Timestamp:
- Nov 4, 2021 9:15:15 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 148056
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r92154 r92223 611 611 </const> 612 612 <const name="v1_19" value="21"> 613 <desc>Settings version "1.19", written by VirtualBox 6.2.x.</desc> 614 <!-- 615 Machine changes: IOMMU device. 616 --> 617 </const> 618 <const name="v1_20" value="22"> 619 <desc>Settings version "1.20", written by VirtualBox 7.0.x.</desc> 613 <desc>Settings version "1.19", written by VirtualBox 7.0.x.</desc> 620 614 <!-- 621 615 VirtualBox.xml additions: HostOnlyNetworks in NetserviceRegistry 622 NetworkAdapter changes: HostOnlyNetwork mode. 616 Machine changes: IOMMU device, HostOnlyNetwork mode for 617 NetworkAdapter. 623 618 --> 624 619 </const> 625 620 <const name="Future" value="99999"> 626 <desc>Settings version greater than "1. 20", written by a future VirtualBox version.</desc>621 <desc>Settings version greater than "1.19", written by a future VirtualBox version.</desc> 627 622 </const> 628 623 </enum> -
trunk/src/VBox/Main/xml/Settings.cpp
r92133 r92223 413 413 else if (uMinor == 19) 414 414 sv = SettingsVersion_v1_19; 415 #ifndef VBOX_WITH_VMNET416 415 else if (uMinor > 19) 417 #else /* VBOX_WITH_VMNET */418 else if (uMinor == 20)419 sv = SettingsVersion_v1_20;420 else if (uMinor > 20)421 #endif /* VBOX_WITH_VMNET */422 416 sv = SettingsVersion_Future; 423 417 } … … 1055 1049 break; 1056 1050 1057 #ifdef VBOX_WITH_VMNET1058 case SettingsVersion_v1_20:1059 pcszVersion = "1.20";1060 break;1061 #endif /* VBOX_WITH_VMNET */1062 1063 1051 default: 1064 1052 // catch human error: the assertion below will trigger in debug … … 1083 1071 // but as it's an omission of someone who changed this file 1084 1072 // it's the only generic possibility. 1085 #ifndef VBOX_WITH_VMNET1086 1073 pcszVersion = "1.19"; 1087 1074 m->sv = SettingsVersion_v1_19; 1088 #else /* VBOX_WITH_VMNET */1089 pcszVersion = "1.20";1090 m->sv = SettingsVersion_v1_20;1091 #endif /* VBOX_WITH_VMNET */1092 1075 } 1093 1076 break; … … 2414 2397 { 2415 2398 #ifdef VBOX_WITH_VMNET 2416 if (m->sv < SettingsVersion_v1_ 20)2399 if (m->sv < SettingsVersion_v1_19) 2417 2400 { 2418 2401 // VirtualBox 7.0 adds support for host-only networks. 2419 2402 if (!llHostOnlyNetworks.empty()) 2420 m->sv = SettingsVersion_v1_ 20;2403 m->sv = SettingsVersion_v1_19; 2421 2404 } 2422 2405 #endif /* VBOX_WITH_VMNET */ … … 7962 7945 void MachineConfigFile::bumpSettingsVersionIfNeeded() 7963 7946 { 7964 #ifdef VBOX_WITH_VMNET 7965 if (m->sv < SettingsVersion_v1_20) 7966 { 7967 // VirtualBox 7.0 adds a host-only network attachment. 7947 if (m->sv < SettingsVersion_v1_19) 7948 { 7949 // VirtualBox 7.0 adds iommu device. 7950 if (hardwareMachine.iommuType != IommuType_None) 7951 { 7952 m->sv = SettingsVersion_v1_19; 7953 return; 7954 } 7955 7956 // VirtualBox 7.0 adds a Trusted Platform Module. 7957 if ( hardwareMachine.tpmSettings.tpmType != TpmType_None 7958 || hardwareMachine.tpmSettings.strLocation.isNotEmpty()) 7959 { 7960 m->sv = SettingsVersion_v1_19; 7961 return; 7962 } 7963 7968 7964 NetworkAdaptersList::const_iterator netit; 7969 7965 for (netit = hardwareMachine.llNetworkAdapters.begin(); … … 7971 7967 ++netit) 7972 7968 { 7973 if (netit->mode == NetworkAttachmentType_HostOnlyNetwork) 7974 { 7975 m->sv = SettingsVersion_v1_20; 7976 break; 7977 } 7978 } 7979 } 7980 #endif /* VBOX_WITH_VMNET */ 7981 if (m->sv < SettingsVersion_v1_19) 7982 { 7983 // VirtualBox 6.2 adds iommu device. 7984 if (hardwareMachine.iommuType != IommuType_None) 7985 { 7986 m->sv = SettingsVersion_v1_19; 7987 return; 7988 } 7989 7990 // VirtualBox 6.2 adds a Trusted Platform Module. 7991 if ( hardwareMachine.tpmSettings.tpmType != TpmType_None 7992 || hardwareMachine.tpmSettings.strLocation.isNotEmpty()) 7993 { 7994 m->sv = SettingsVersion_v1_19; 7995 return; 7996 } 7997 7998 NetworkAdaptersList::const_iterator netit; 7999 for (netit = hardwareMachine.llNetworkAdapters.begin(); 8000 netit != hardwareMachine.llNetworkAdapters.end(); 8001 ++netit) 8002 { 7969 // VirtualBox 7.0 adds a flag if NAT can reach localhost. 8003 7970 if ( netit->fEnabled 8004 7971 && netit->mode == NetworkAttachmentType_NAT … … 8008 7975 break; 8009 7976 } 7977 7978 #ifdef VBOX_WITH_VMNET 7979 // VirtualBox 7.0 adds a host-only network attachment. 7980 if (netit->mode == NetworkAttachmentType_HostOnlyNetwork) 7981 { 7982 m->sv = SettingsVersion_v1_19; 7983 break; 7984 } 7985 #endif /* VBOX_WITH_VMNET */ 8010 7986 } 8011 7987 }
Note:
See TracChangeset
for help on using the changeset viewer.