Changeset 67625 in vbox
- Timestamp:
- Jun 27, 2017 9:20:27 AM (8 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r67618 r67625 154 154 { 155 155 /* default values for a newly created machine */ 156 mHWVersion = "2"; /** @todo get the default from the schema if that is possible. */156 mHWVersion = Utf8StrFmt("%d", SchemaDefs::DefaultHardwareVersion) 157 157 mMemorySize = 128; 158 158 mCPUCount = 1; … … 1385 1385 Utf8Str hwVersion = aHardwareVersion; 1386 1386 if ( hwVersion.compare("1") != 0 1387 && hwVersion.compare("2") != 0) 1387 && hwVersion.compare("2") != 0) // VBox 2.1.x and later (VMMDev heap) 1388 1388 return setError(E_INVALIDARG, 1389 1389 tr("Invalid hardware version: %s\n"), aHardwareVersion.c_str()); … … 10286 10286 { 10287 10287 /* The hardware version attribute (optional). 10288 Automatically upgrade from 1 to 2 when there is no saved state. (ugly!) */ 10288 Automatically upgrade from 1 to current default hardware version 10289 when there is no saved state. (ugly!) */ 10289 10290 if ( mHWData->mHWVersion == "1" 10290 10291 && mSSData->strStateFilePath.isEmpty() 10291 10292 ) 10292 mHWData->mHWVersion = "2"; /** @todo Is this safe, to update mHWVersion here? If not some 10293 other point needs to be found where this can be done. */ 10293 mHWData->mHWVersion = Utf8StrFmt("%d", SchemaDefs::DefaultHardwareVersion); 10294 10294 10295 10295 data.strVersion = mHWData->mHWVersion; -
trunk/src/VBox/Main/xml/SchemaDefs.xsl
r59925 r67625 43 43 <xsl:param name="select"/> 44 44 <xsl:if test="$select"> 45 <xsl:value-of select="concat( $member, ' = ', $select, ',
')"/>45 <xsl:value-of select="concat(' ', $member, ' = ', $select, ',
')"/> 46 46 </xsl:if> 47 47 </xsl:template> … … 125 125 126 126 <xsl:call-template name="defineEnumMember"> 127 <xsl:with-param name="member" select="' 127 <xsl:with-param name="member" select="'MinGuestRAM'"/> 128 128 <xsl:with-param name="select" select=" 129 129 xsd:complexType[@name='TMemory']/xsd:attribute[@name='RAMSize']//xsd:minInclusive/@value … … 131 131 </xsl:call-template> 132 132 <xsl:call-template name="defineEnumMember"> 133 <xsl:with-param name="member" select="' 133 <xsl:with-param name="member" select="'MaxGuestRAM'"/> 134 134 <xsl:with-param name="select" select=" 135 135 xsd:complexType[@name='TMemory']/xsd:attribute[@name='RAMSize']//xsd:maxInclusive/@value … … 138 138 139 139 <xsl:call-template name="defineEnumMember"> 140 <xsl:with-param name="member" select="' 140 <xsl:with-param name="member" select="'MinGuestVRAM'"/> 141 141 <xsl:with-param name="select" select=" 142 142 xsd:complexType[@name='TDisplay']/xsd:attribute[@name='VRAMSize']//xsd:minInclusive/@value … … 144 144 </xsl:call-template> 145 145 <xsl:call-template name="defineEnumMember"> 146 <xsl:with-param name="member" select="' 146 <xsl:with-param name="member" select="'MaxGuestVRAM'"/> 147 147 <xsl:with-param name="select" select=" 148 148 xsd:complexType[@name='TDisplay']/xsd:attribute[@name='VRAMSize']//xsd:maxInclusive/@value … … 151 151 152 152 <xsl:call-template name="defineEnumMember"> 153 <xsl:with-param name="member" select="' 153 <xsl:with-param name="member" select="'MinCPUCount'"/> 154 154 <xsl:with-param name="select" select=" 155 155 xsd:simpleType[@name='TCPUCount']//xsd:minInclusive/@value … … 157 157 </xsl:call-template> 158 158 <xsl:call-template name="defineEnumMember"> 159 <xsl:with-param name="member" select="' 159 <xsl:with-param name="member" select="'MaxCPUCount'"/> 160 160 <xsl:with-param name="select" select=" 161 161 xsd:simpleType[@name='TCPUCount']//xsd:maxInclusive/@value … … 164 164 165 165 <xsl:call-template name="defineEnumMember"> 166 <xsl:with-param name="member" select="' 166 <xsl:with-param name="member" select="'MaxGuestMonitors'"/> 167 167 <xsl:with-param name="select" select=" 168 168 xsd:simpleType[@name='TMonitorCount']//xsd:maxInclusive/@value … … 171 171 172 172 <xsl:call-template name="defineEnumMember"> 173 <xsl:with-param name="member" select="' 173 <xsl:with-param name="member" select="'SerialPortCount'"/> 174 174 <xsl:with-param name="select" select=" 175 175 xsd:complexType[@name='TUARTPort']/xsd:attribute[@name='slot']//xsd:maxExclusive/@value … … 178 178 179 179 <xsl:call-template name="defineEnumMember"> 180 <xsl:with-param name="member" select="' 180 <xsl:with-param name="member" select="'ParallelPortCount'"/> 181 181 <xsl:with-param name="select" select=" 182 182 xsd:complexType[@name='TLPTPort']/xsd:attribute[@name='slot']//xsd:maxExclusive/@value … … 185 185 186 186 <xsl:call-template name="defineEnumMember"> 187 <xsl:with-param name="member" select="' 187 <xsl:with-param name="member" select="'MaxBootPosition'"/> 188 188 <xsl:with-param name="select" select=" 189 189 xsd:complexType[@name='TBoot']//xsd:element[@name='Order']//xsd:attribute[@name='position']//xsd:maxInclusive/@value 190 "/> 191 </xsl:call-template> 192 193 <xsl:call-template name="defineEnumMember"> 194 <xsl:with-param name="member" select="'DefaultHardwareVersion'"/> 195 <xsl:with-param name="select" select=" 196 xsd:complexType[@name='THardware']/xsd:attribute[@name='version']/@default 190 197 "/> 191 198 </xsl:call-template>
Note:
See TracChangeset
for help on using the changeset viewer.