Changeset 24989 in vbox for trunk/src/VBox/Main/xml
- Timestamp:
- Nov 26, 2009 11:31:46 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 55293
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r24888 r24989 179 179 va_list args; 180 180 va_start(args, pcszFormat); 181 Utf8StrFmtVA what(pcszFormat, args);181 Utf8StrFmtVA strWhat(pcszFormat, args); 182 182 va_end(args); 183 183 … … 190 190 file->m->strFilename.c_str(), 191 191 (pcsz) ? pcsz : "", 192 what.c_str());192 strWhat.c_str()); 193 193 194 194 setWhat(str.c_str()); … … 1089 1089 */ 1090 1090 void MainConfigFile::writeHardDisk(xml::ElementNode &elmMedium, 1091 const Medium &m ,1091 const Medium &mdm, 1092 1092 uint32_t level) // 0 for "root" call, incremented with each recursion 1093 1093 { 1094 1094 xml::ElementNode *pelmHardDisk = elmMedium.createChild("HardDisk"); 1095 pelmHardDisk->setAttribute("uuid", makeString(m .uuid));1096 pelmHardDisk->setAttribute("location", m .strLocation);1097 pelmHardDisk->setAttribute("format", m .strFormat);1098 if (m .fAutoReset)1099 pelmHardDisk->setAttribute("autoReset", m .fAutoReset);1100 if (m .strDescription.length())1101 pelmHardDisk->setAttribute("Description", m .strDescription);1102 1103 for (PropertiesMap::const_iterator it = m .properties.begin();1104 it != m .properties.end();1095 pelmHardDisk->setAttribute("uuid", makeString(mdm.uuid)); 1096 pelmHardDisk->setAttribute("location", mdm.strLocation); 1097 pelmHardDisk->setAttribute("format", mdm.strFormat); 1098 if (mdm.fAutoReset) 1099 pelmHardDisk->setAttribute("autoReset", mdm.fAutoReset); 1100 if (mdm.strDescription.length()) 1101 pelmHardDisk->setAttribute("Description", mdm.strDescription); 1102 1103 for (PropertiesMap::const_iterator it = mdm.properties.begin(); 1104 it != mdm.properties.end(); 1105 1105 ++it) 1106 1106 { … … 1114 1114 { 1115 1115 const char *pcszType = 1116 m .hdType == MediumType_Normal ? "Normal" :1117 m .hdType == MediumType_Immutable ? "Immutable" :1118 /*m .hdType == MediumType_Writethrough ?*/ "Writethrough";1116 mdm.hdType == MediumType_Normal ? "Normal" : 1117 mdm.hdType == MediumType_Immutable ? "Immutable" : 1118 /*mdm.hdType == MediumType_Writethrough ?*/ "Writethrough"; 1119 1119 pelmHardDisk->setAttribute("type", pcszType); 1120 1120 } 1121 1121 1122 for (MediaList::const_iterator it = m .llChildren.begin();1123 it != m .llChildren.end();1122 for (MediaList::const_iterator it = mdm.llChildren.begin(); 1123 it != mdm.llChildren.end(); 1124 1124 ++it) 1125 1125 { … … 1171 1171 ++it) 1172 1172 { 1173 const Medium &m = *it;1173 const Medium &mdm = *it; 1174 1174 xml::ElementNode *pelmMedium = pelmDVDImages->createChild("Image"); 1175 pelmMedium->setAttribute("uuid", makeString(m .uuid));1176 pelmMedium->setAttribute("location", m .strLocation);1177 if (m .strDescription.length())1178 pelmMedium->setAttribute("Description", m .strDescription);1175 pelmMedium->setAttribute("uuid", makeString(mdm.uuid)); 1176 pelmMedium->setAttribute("location", mdm.strLocation); 1177 if (mdm.strDescription.length()) 1178 pelmMedium->setAttribute("Description", mdm.strDescription); 1179 1179 } 1180 1180 … … 1184 1184 ++it) 1185 1185 { 1186 const Medium &m = *it;1186 const Medium &mdm = *it; 1187 1187 xml::ElementNode *pelmMedium = pelmFloppyImages->createChild("Image"); 1188 pelmMedium->setAttribute("uuid", makeString(m .uuid));1189 pelmMedium->setAttribute("location", m .strLocation);1190 if (m .strDescription.length())1191 pelmMedium->setAttribute("Description", m .strDescription);1188 pelmMedium->setAttribute("uuid", makeString(mdm.uuid)); 1189 pelmMedium->setAttribute("location", mdm.strLocation); 1190 if (mdm.strDescription.length()) 1191 pelmMedium->setAttribute("Description", mdm.strDescription); 1192 1192 } 1193 1193
Note:
See TracChangeset
for help on using the changeset viewer.