VirtualBox

Changeset 71581 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Mar 30, 2018 10:38:27 AM (7 years ago)
Author:
vboxsync
Message:

bugref:8345. Attempt to fix the subtle bug with MEDIUMTASK structure initialization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/MachineImplMoveVM.h

    r71053 r71581  
    3737typedef struct
    3838{
     39    bool                    fSnapshot;
    3940    Utf8Str                 strBaseName;
    4041    ComPtr<IMedium>         pMedium;
    4142    uint32_t                uIdx;
    4243    ULONG                   uWeight;
    43     bool                    fSnapshot;
    44 } MEDIUMTASK;
     44} MEDIUMTASKMOVE;
    4545
    4646typedef struct
    4747{
    48     RTCList<MEDIUMTASK>     chain;
     48    RTCList<MEDIUMTASKMOVE>     chain;
    4949    DeviceType_T            devType;
    5050    bool                    fCreateDiffs;
    5151    bool                    fAttachLinked;
    52 } MEDIUMTASKCHAIN;
     52} MEDIUMTASKCHAINMOVE;
    5353
    5454typedef struct
     
    5757    Utf8Str                 strSaveStateFile;
    5858    ULONG                   uWeight;
    59 } SAVESTATETASK;
     59} SAVESTATETASKMOVE;
    6060
    6161struct fileList_t;
     
    8787    static void i_MoveVMThreadTask(MachineMoveVM* task);
    8888
    89     RTCList<MEDIUMTASKCHAIN>    llMedias;
    90     RTCList<SAVESTATETASK>      llSaveStateFiles;
    91     std::map<Utf8Str, MEDIUMTASK>     finalMediumsMap;
    92     std::map<Utf8Str, SAVESTATETASK>  finalSaveStateFilesMap;
     89    RTCList<MEDIUMTASKCHAINMOVE>    llMedias;
     90    RTCList<SAVESTATETASKMOVE>      llSaveStateFiles;
     91    std::map<Utf8Str, MEDIUMTASKMOVE>     finalMediumsMap;
     92    std::map<Utf8Str, SAVESTATETASKMOVE>  finalSaveStateFilesMap;
    9393    std::map<VBoxFolder_t, Utf8Str> vmFolders;
    9494
     
    111111    inline HRESULT queryBaseName(const ComPtr<IMedium> &pMedium, Utf8Str &strBaseName) const;
    112112    HRESULT queryMediasForAllStates(const std::vector<ComObjPtr<Machine> > &aMachineList);
    113     void updateProgressStats(MEDIUMTASKCHAIN &mtc, ULONG &uCount, ULONG &uTotalWeight) const;
     113    void updateProgressStats(MEDIUMTASKCHAINMOVE &mtc, ULONG &uCount, ULONG &uTotalWeight) const;
    114114    HRESULT addSaveState(const ComObjPtr<Machine> &machine);
    115115    void printStateFile(settings::SnapshotsList &snl);
     
    117117    HRESULT getFolderSize(const Utf8Str& strRootFolder, uint64_t& size);
    118118    HRESULT deleteFiles(const RTCList<Utf8Str>& listOfFiles);
    119     HRESULT updatePathsToStateFiles(const std::map<Utf8Str, SAVESTATETASK>& listOfFiles,
     119    HRESULT updatePathsToStateFiles(const std::map<Utf8Str, SAVESTATETASKMOVE>& listOfFiles,
    120120                                    const Utf8Str& sourcePath, const Utf8Str& targetPath);
    121     HRESULT moveAllDisks(const std::map<Utf8Str, MEDIUMTASK>& listOfDisks, const Utf8Str* strTargetFolder = NULL);
    122     HRESULT restoreAllDisks(const std::map<Utf8Str, MEDIUMTASK>& listOfDisks);
     121    HRESULT moveAllDisks(const std::map<Utf8Str, MEDIUMTASKMOVE>& listOfDisks, const Utf8Str* strTargetFolder = NULL);
     122    HRESULT restoreAllDisks(const std::map<Utf8Str, MEDIUMTASKMOVE>& listOfDisks);
    123123    bool isMediumTypeSupportedForMoving(const ComPtr<IMedium> &pMedium);
    124124};
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