VirtualBox

Ignore:
Timestamp:
Jan 30, 2023 7:44:51 PM (23 months ago)
Author:
vboxsync
Message:

Main: Fix identifiers containing an incorrect plural of "medium".

File:
1 edited

Legend:

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

    r98351 r98352  
    321321    ULONG uTotalWeight = 1;
    322322
    323     /* The lists m_llMedias, m_llSaveStateFiles and m_llNVRAMFiles are filled in the queryMediasForAllStates() */
    324     hrc = queryMediasForAllStates();
     323    /* The lists m_llMedia, m_llSaveStateFiles and m_llNVRAMFiles are filled in the queryMediaForAllStates() */
     324    hrc = queryMediaForAllStates();
    325325    if (FAILED(hrc))
    326326        return hrc;
    327327
    328     /* Calculate the total size of images. Fill m_finalMediumsMap */
     328    /* Calculate the total size of images. Fill m_finalMediaMap */
    329329    { /** The scope here for better reading, apart from that the variables have limited scope too */
    330         uint64_t totalMediumsSize = 0;
    331 
    332         for (size_t i = 0; i < m_llMedias.size(); ++i)
    333         {
    334             MEDIUMTASKCHAINMOVE &mtc = m_llMedias.at(i);
     330        uint64_t totalMediaSize = 0;
     331
     332        for (size_t i = 0; i < m_llMedia.size(); ++i)
     333        {
     334            MEDIUMTASKCHAINMOVE &mtc = m_llMedia.at(i);
    335335            for (size_t a = mtc.chain.size(); a > 0; --a)
    336336            {
     
    353353
    354354                    std::pair<std::map<Utf8Str, MEDIUMTASKMOVE>::iterator,bool> ret;
    355                     ret = m_finalMediumsMap.insert(std::make_pair(name, mtc.chain[a - 1]));
     355                    ret = m_finalMediaMap.insert(std::make_pair(name, mtc.chain[a - 1]));
    356356                    if (ret.second == true)
    357357                    {
     
    359359                        ++uCount;
    360360                        uTotalWeight += mtc.chain[a - 1].uWeight;
    361                         totalMediumsSize += (uint64_t)cbSize;
     361                        totalMediaSize += (uint64_t)cbSize;
    362362                        Log2(("Image %s was added into the moved list\n", name.c_str()));
    363363                    }
     
    366366        }
    367367
    368         Log2(("Total Size of images is %lld bytes\n", totalMediumsSize));
    369         neededFreeSpace += totalMediumsSize;
     368        Log2(("Total Size of images is %lld bytes\n", totalMediaSize));
     369        neededFreeSpace += totalMediaSize;
    370370    }
    371371
     
    666666    {
    667667        /* Move all disks */
    668         hrc = taskMoveVM->moveAllDisks(taskMoveVM->m_finalMediumsMap, strTargetFolder);
     668        hrc = taskMoveVM->moveAllDisks(taskMoveVM->m_finalMediaMap, strTargetFolder);
    669669        if (FAILED(hrc))
    670670            throw hrc;
     
    10081008                taskMoveVM->m_pProgress->SetNextOperation(BstrFmt(tr("Skip the empty operation %d..."), i + 1).raw(), 1);
    10091009
    1010             hrc = taskMoveVM->moveAllDisks(taskMoveVM->m_finalMediumsMap);
     1010            hrc = taskMoveVM->moveAllDisks(taskMoveVM->m_finalMediaMap);
    10111011            if (FAILED(hrc))
    10121012                throw hrc;
     
    10981098         * because we doubled the number of operations for rollback case.
    10991099         * But if we want to update the progress object corectly it's needed to add all medium moved by standard
    1100          * "move medium" logic (for us it's taskMoveVM->m_finalMediumsMap) to the current number of operation.
     1100         * "move medium" logic (for us it's taskMoveVM->m_finalMediaMap) to the current number of operation.
    11011101         */
    11021102
     
    11061106        hrc = taskMoveVM->m_pProgress->COMGETTER(Operation)(&operation);
    11071107
    1108         for (ULONG i = operation; i < operation + taskMoveVM->m_finalMediumsMap.size() - 1; ++i)
     1108        for (ULONG i = operation; i < operation + taskMoveVM->m_finalMediaMap.size() - 1; ++i)
    11091109            taskMoveVM->m_pProgress->SetNextOperation(BstrFmt(tr("Skip the empty operation %d..."), i).raw(), 1);
    11101110
     
    14361436}
    14371437
    1438 HRESULT MachineMoveVM::queryMediasForAllStates()
     1438HRESULT MachineMoveVM::queryMediaForAllStates()
    14391439{
    14401440    /* In this case we create a exact copy of the original VM. This means just
     
    15251525            }
    15261526
    1527             m_llMedias.append(mtc);
     1527            m_llMedia.append(mtc);
    15281528        }
    15291529
     
    15401540     * that in the previous loop, cause there we go from child -> parent and
    15411541     * didn't know how many are between. */
    1542     for (size_t i = 0; i < m_llMedias.size(); ++i)
     1542    for (size_t i = 0; i < m_llMedia.size(); ++i)
    15431543    {
    15441544        uint32_t uIdx = 0;
    1545         MEDIUMTASKCHAINMOVE &mtc = m_llMedias.at(i);
     1545        MEDIUMTASKCHAINMOVE &mtc = m_llMedia.at(i);
    15461546        for (size_t a = mtc.chain.size(); a > 0; --a)
    15471547            mtc.chain[a - 1].uIdx = uIdx++;
Note: See TracChangeset for help on using the changeset viewer.

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