VirtualBox

Ignore:
Timestamp:
Mar 25, 2014 6:29:02 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92972
Message:

6813 src-all/ProgressImp.cpp + some formatting/line length sorting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/ApplianceImpl.cpp

    r50444 r50874  
    140140    { ovf::CIMOSType_CIMOS_FreeBSD_64,                           VBOXOSTYPE_FreeBSD_x64 },
    141141    { ovf::CIMOSType_CIMOS_MACOS,                                VBOXOSTYPE_MacOS },
    142     { ovf::CIMOSType_CIMOS_MACOS,                                VBOXOSTYPE_MacOS_x64 },            // there is no CIM 64-bit type for this
     142    { ovf::CIMOSType_CIMOS_MACOS,                                VBOXOSTYPE_MacOS_x64 }, // there is no CIM 64-bit type for this
    143143    { ovf::CIMOSType_CIMOS_MACOS,                                VBOXOSTYPE_MacOS106 },
    144144    { ovf::CIMOSType_CIMOS_MACOS,                                VBOXOSTYPE_MacOS106_x64 },
     
    189189//     { ovf::CIMOSType_CIMOS_VMwareESXi = 104,                                                 // we can't run ESX in a VM
    190190    { 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
    192193    { ovf::CIMOSType_CIMOS_CentOS,                               VBOXOSTYPE_RedHat },
    193194    { ovf::CIMOSType_CIMOS_CentOS_64,                            VBOXOSTYPE_RedHat_x64 },
     
    815816    /** @todo: Maybe too cost-intensive; try to find a lighter way */
    816817    while (    RTPathExists(tmpName)
    817             || mVirtualBox->OpenMedium(Bstr(tmpName).raw(), DeviceType_HardDisk, AccessMode_ReadWrite, FALSE /* fForceNewUuid */,  &harddisk) != VBOX_E_OBJECT_NOT_FOUND
    818           )
     818            || mVirtualBox->OpenMedium(Bstr(tmpName).raw(), DeviceType_HardDisk, AccessMode_ReadWrite,
     819                                       FALSE /* fForceNewUuid */,  &harddisk) != VBOX_E_OBJECT_NOT_FOUND)
    819820    {
    820821        RTStrFree(tmpName);
     
    888889                ++cOperations;          // another one for creating the manifest
    889890
    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
    891893                ulTotalOperationsWeight += m->ulWeightForManifestOperation;
    892894            }
     
    916918            if (m->ulTotalDisksMB)
    917919            {
    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)
    919924                ulTotalOperationsWeight = m->ulTotalDisksMB + m->ulWeightForXmlOperation;
    920925            }
     
    925930                m->ulWeightForXmlOperation = 1;
    926931            }
    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 */
    928935            ulTotalOperationsWeight += ulOVFCreationWeight;
    929936            break;
     
    931938    }
    932939
    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));
    935944
    936945    rc = pProgress->init(mVirtualBox, static_cast<IAppliance*>(this),
     
    11721181
    11731182    if (!task->pProgress.isNull())
    1174         task->pProgress->notifyComplete(taskrc);
     1183        task->pProgress->i_notifyComplete(taskrc);
    11751184
    11761185    LogFlowFuncLeave();
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette