Changeset 50874 in vbox for trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
- Timestamp:
- Mar 25, 2014 6:29:02 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 92972
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
r50444 r50874 140 140 { ovf::CIMOSType_CIMOS_FreeBSD_64, VBOXOSTYPE_FreeBSD_x64 }, 141 141 { ovf::CIMOSType_CIMOS_MACOS, VBOXOSTYPE_MacOS }, 142 { ovf::CIMOSType_CIMOS_MACOS, VBOXOSTYPE_MacOS_x64 }, 142 { ovf::CIMOSType_CIMOS_MACOS, VBOXOSTYPE_MacOS_x64 }, // there is no CIM 64-bit type for this 143 143 { ovf::CIMOSType_CIMOS_MACOS, VBOXOSTYPE_MacOS106 }, 144 144 { ovf::CIMOSType_CIMOS_MACOS, VBOXOSTYPE_MacOS106_x64 }, … … 189 189 // { ovf::CIMOSType_CIMOS_VMwareESXi = 104, // we can't run ESX in a VM 190 190 { ovf::CIMOSType_CIMOS_Windows7, VBOXOSTYPE_Win7 }, 191 { ovf::CIMOSType_CIMOS_Windows7, VBOXOSTYPE_Win7_x64 }, // there is no CIM 64-bit type for this 191 { ovf::CIMOSType_CIMOS_Windows7, VBOXOSTYPE_Win7_x64 }, // there is no 192 // CIM 64-bit type for this 192 193 { ovf::CIMOSType_CIMOS_CentOS, VBOXOSTYPE_RedHat }, 193 194 { ovf::CIMOSType_CIMOS_CentOS_64, VBOXOSTYPE_RedHat_x64 }, … … 815 816 /** @todo: Maybe too cost-intensive; try to find a lighter way */ 816 817 while ( RTPathExists(tmpName) 817 || mVirtualBox->OpenMedium(Bstr(tmpName).raw(), DeviceType_HardDisk, AccessMode_ReadWrite, FALSE /* fForceNewUuid */, &harddisk) != VBOX_E_OBJECT_NOT_FOUND818 )818 || mVirtualBox->OpenMedium(Bstr(tmpName).raw(), DeviceType_HardDisk, AccessMode_ReadWrite, 819 FALSE /* fForceNewUuid */, &harddisk) != VBOX_E_OBJECT_NOT_FOUND) 819 820 { 820 821 RTStrFree(tmpName); … … 888 889 ++cOperations; // another one for creating the manifest 889 890 890 m->ulWeightForManifestOperation = (ULONG)((double)m->ulTotalDisksMB * .1 / 100); // use .5% of the progress for the manifest 891 m->ulWeightForManifestOperation = (ULONG)((double)m->ulTotalDisksMB * .1 / 100); // use .5% of the 892 // progress for the manifest 891 893 ulTotalOperationsWeight += m->ulWeightForManifestOperation; 892 894 } … … 916 918 if (m->ulTotalDisksMB) 917 919 { 918 m->ulWeightForXmlOperation = (ULONG)((double)m->ulTotalDisksMB * 1 / 100); // use 1% of the progress for OVF file upload (we didn't know the size at this point) 920 m->ulWeightForXmlOperation = (ULONG)((double)m->ulTotalDisksMB * 1 / 100); // use 1% of the progress 921 // for OVF file upload 922 // (we didn't know the 923 // size at this point) 919 924 ulTotalOperationsWeight = m->ulTotalDisksMB + m->ulWeightForXmlOperation; 920 925 } … … 925 930 m->ulWeightForXmlOperation = 1; 926 931 } 927 ULONG ulOVFCreationWeight = (ULONG)((double)ulTotalOperationsWeight * 50.0 / 100.0); /* Use 50% for the creation of the OVF & the disks */ 932 ULONG ulOVFCreationWeight = (ULONG)((double)ulTotalOperationsWeight * 50.0 / 100.0); /* Use 50% for the 933 creation of the OVF 934 & the disks */ 928 935 ulTotalOperationsWeight += ulOVFCreationWeight; 929 936 break; … … 931 938 } 932 939 933 Log(("Setting up progress object: ulTotalMB = %d, cDisks = %d, => cOperations = %d, ulTotalOperationsWeight = %d, m->ulWeightForXmlOperation = %d\n", 934 m->ulTotalDisksMB, m->cDisks, cOperations, ulTotalOperationsWeight, m->ulWeightForXmlOperation)); 940 Utf8Str str; 941 str = "Setting up progress object: ulTotalMB = %d, cDisks = %d, => cOperations = %d,"; 942 str += "ulTotalOperationsWeight = %d, m->ulWeightForXmlOperation = %d\n"; 943 Log((str.c_str(), m->ulTotalDisksMB, m->cDisks, cOperations, ulTotalOperationsWeight, m->ulWeightForXmlOperation)); 935 944 936 945 rc = pProgress->init(mVirtualBox, static_cast<IAppliance*>(this), … … 1172 1181 1173 1182 if (!task->pProgress.isNull()) 1174 task->pProgress-> notifyComplete(taskrc);1183 task->pProgress->i_notifyComplete(taskrc); 1175 1184 1176 1185 LogFlowFuncLeave();
Note:
See TracChangeset
for help on using the changeset viewer.