Changeset 28596 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 22, 2010 2:02:59 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 60441
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ApplianceImpl.cpp
r28165 r28596 1244 1244 void VirtualSystemDescription::addEntry(VirtualSystemDescriptionType_T aType, 1245 1245 const Utf8Str &strRef, 1246 const Utf8Str &aO rigValue,1247 const Utf8Str &a AutoValue,1246 const Utf8Str &aOvfValue, 1247 const Utf8Str &aVboxValue, 1248 1248 uint32_t ulSizeMB, 1249 1249 const Utf8Str &strExtraConfig /*= ""*/) … … 1253 1253 vsde.type = aType; 1254 1254 vsde.strRef = strRef; 1255 vsde.strOvf = aO rigValue;1256 vsde.strVbox = a AutoValue;1255 vsde.strOvf = aOvfValue; 1256 vsde.strVbox = aVboxValue; 1257 1257 vsde.strExtraConfig = strExtraConfig; 1258 1258 vsde.ulSizeMB = ulSizeMB; -
trunk/src/VBox/Main/ApplianceImplExport.cpp
r28531 r28596 222 222 lIDEControllerPrimaryIndex = (int32_t)pNewDesc->m->llDescriptions.size(); 223 223 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerIDE, 224 Utf8StrFmt("%d", lIDEControllerPrimaryIndex), 225 strVbox, 226 strVbox); 224 Utf8StrFmt("%d", lIDEControllerPrimaryIndex), // strRef 225 strVbox, // aOvfValue 226 strVbox); // aVboxValue 227 227 lIDEControllerSecondaryIndex = lIDEControllerPrimaryIndex + 1; 228 228 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerIDE, … … 664 664 XMLStack &stack) 665 665 { 666 LogFlowFunc(("ENTER appliance %p\n", this)); 667 666 668 xml::ElementNode *pelmVirtualSystem; 667 669 if (enFormat == OVF_0_9) … … 865 867 { 866 868 const VirtualSystemDescriptionEntry &desc = *itD; 869 870 LogFlowFunc(("Loop %u: handling description entry ulIndex=%u, type=%s, strRef=%s, strOvf=%s, strVbox=%s, strExtraConfig=%s\n", 871 uLoop, 872 desc.ulIndex, 873 ( desc.type == VirtualSystemDescriptionType_HardDiskControllerIDE ? "HardDiskControllerIDE" 874 : desc.type == VirtualSystemDescriptionType_HardDiskControllerSATA ? "HardDiskControllerSATA" 875 : desc.type == VirtualSystemDescriptionType_HardDiskControllerSCSI ? "HardDiskControllerSCSI" 876 : desc.type == VirtualSystemDescriptionType_HardDiskImage ? "HardDiskImage" 877 : Utf8StrFmt("%d", desc.type).c_str()), 878 desc.strRef.c_str(), 879 desc.strOvf.c_str(), 880 desc.strVbox.c_str(), 881 desc.strExtraConfig.c_str())); 867 882 868 883 ovf::ResourceType_T type = (ovf::ResourceType_T)0; // if this becomes != 0 then we do stuff … … 944 959 strResourceSubType = desc.strVbox; 945 960 946 if ( desc.strRef != "1")961 if (!lIDEPrimaryControllerIndex) 947 962 { 948 963 // first IDE controller: … … 1063 1078 size_t pos1 = desc.strExtraConfig.find("controller="); 1064 1079 size_t pos2 = desc.strExtraConfig.find("channel="); 1080 int32_t lControllerIndex = -1; 1065 1081 if (pos1 != Utf8Str::npos) 1066 1082 { 1067 int32_t lControllerIndex = -1;1068 1083 RTStrToInt32Ex(desc.strExtraConfig.c_str() + pos1 + 11, NULL, 0, &lControllerIndex); 1069 1084 if (lControllerIndex == lIDEPrimaryControllerIndex) … … 1078 1093 if (pos2 != Utf8Str::npos) 1079 1094 RTStrToInt32Ex(desc.strExtraConfig.c_str() + pos2 + 8, NULL, 0, &lAddressOnParent); 1095 1096 LogFlowFunc(("HardDiskImage details: pos1=%d, pos2=%d, lControllerIndex=%d, lIDEPrimaryControllerIndex=%d, lIDESecondaryControllerIndex=%d, ulParent=%d, lAddressOnParent=%d\n", 1097 pos1, pos2, lControllerIndex, lIDEPrimaryControllerIndex, lIDESecondaryControllerIndex, ulParent, lAddressOnParent)); 1080 1098 1081 1099 if ( !ulParent … … 1293 1311 HRESULT Appliance::writeFS(const LocationInfo &locInfo, const OVFFormat enFormat, ComObjPtr<Progress> &pProgress) 1294 1312 { 1295 LogFlowFuncEnter(); 1296 LogFlowFunc(("Appliance %p\n", this)); 1313 LogFlowFunc(("ENTER appliance %p\n", this)); 1297 1314 1298 1315 AutoCaller autoCaller(this); -
trunk/src/VBox/Main/ApplianceImplImport.cpp
r28531 r28596 395 395 { 396 396 case ovf::HardDiskController::IDE: 397 /* Check for the constrains */ 398 if (cIDEused < 4) 397 399 { 398 /* Check for the constrains */ 399 /* @todo: I'm very confused! Are these bits *one* controller or 400 is every port/bus declared as an extra controller. */ 401 if (cIDEused < 4) 402 { 403 // @todo: figure out the IDE types 404 /* Use PIIX4 as default */ 405 Utf8Str strType = "PIIX4"; 406 if (!hdc.strControllerType.compare("PIIX3", Utf8Str::CaseInsensitive)) 407 strType = "PIIX3"; 408 else if (!hdc.strControllerType.compare("ICH6", Utf8Str::CaseInsensitive)) 409 strType = "ICH6"; 410 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerIDE, 411 strControllerID, 412 hdc.strControllerType, 413 strType); 414 } 415 else 416 { 417 /* Warn only once */ 418 if (cIDEused == 1) 419 addWarning(tr("The virtual \"%s\" system requests support for more than one IDE controller, but VirtualBox has support for only one."), 420 vsysThis.strName.c_str()); 421 422 } 423 ++cIDEused; 424 break; 400 // @todo: figure out the IDE types 401 /* Use PIIX4 as default */ 402 Utf8Str strType = "PIIX4"; 403 if (!hdc.strControllerType.compare("PIIX3", Utf8Str::CaseInsensitive)) 404 strType = "PIIX3"; 405 else if (!hdc.strControllerType.compare("ICH6", Utf8Str::CaseInsensitive)) 406 strType = "ICH6"; 407 pNewDesc->addEntry(VirtualSystemDescriptionType_HardDiskControllerIDE, 408 strControllerID, // strRef 409 hdc.strControllerType, // aOvfValue 410 strType); // aVboxValue 425 411 } 412 else 413 /* Warn only once */ 414 if (cIDEused == 2) 415 addWarning(tr("The virtual \"%s\" system requests support for more than two IDE controller channels, but VirtualBox supports only two."), 416 vsysThis.strName.c_str()); 417 418 ++cIDEused; 419 break; 426 420 427 421 case ovf::HardDiskController::SATA: -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r28557 r28596 3534 3534 <li> 3535 3535 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items. 3536 This has no value in @a aOvfValues[] or @a aVBoxValues[]. 3536 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify 3537 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox 3538 writes into the OVF. 3537 3539 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk" 3538 3540 type can use to specify which hard disk controller a virtual disk should be connected to. … … 8618 8620 data. Pass 0 for an infinite timeout. 8619 8621 </desc> 8620 </param> 8622 </param> 8621 8623 <param name="size" type="unsigned long long" dir="in"> 8622 8624 <desc> -
trunk/src/VBox/Main/include/ApplianceImpl.h
r28165 r28596 260 260 void addEntry(VirtualSystemDescriptionType_T aType, 261 261 const Utf8Str &strRef, 262 const Utf8Str &aO rigValue,263 const Utf8Str &a AutoValue,262 const Utf8Str &aOvfValue, 263 const Utf8Str &aVboxValue, 264 264 uint32_t ulSizeMB = 0, 265 265 const Utf8Str &strExtraConfig = "");
Note:
See TracChangeset
for help on using the changeset viewer.