VirtualBox

Changeset 97359 in vbox


Ignore:
Timestamp:
Nov 1, 2022 1:28:02 AM (2 years ago)
Author:
vboxsync
Message:

bugref:4784 - separated SharedFolder API from being used from both Machine and Console

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r96888 r97359  
    6868#include "USBDeviceImpl.h"
    6969#include "RemoteUSBDeviceImpl.h"
    70 #include "SharedFolderImpl.h"
     70#include "ConsoleSharedFolderImpl.h"
    7171#ifdef VBOX_WITH_AUDIO_VRDE
    7272# include "DrvAudioVRDE.h"
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r96888 r97359  
    4949#include "USBDeviceFiltersImpl.h"
    5050#include "HostImpl.h"
    51 #include "SharedFolderImpl.h"
     51#include "MachineSharedFolderImpl.h"
    5252#include "GuestOSTypeImpl.h"
    5353#include "VirtualBoxErrorInfoImpl.h"
     
    1189611896 * adds hard disks to the list. If it is CleanupMode_Full, this adds all
    1189711897 * media to the list.
     11898 * CleanupMode_DetachAllReturnHardDisksAndVMRemovable adds hard disk and
     11899 * also removable medias if they are located in the VM folder and referenced
     11900 * only by this VM (media prepared by unattended installer).
    1189811901 *
    1189911902 * This gets called from Machine::Unregister, both for the actual Machine and
     
    1194111944            AutoReadLock lock(pMedium COMMA_LOCKVAL_SRC_POS);
    1194211945            DeviceType_T devType = pMedium->i_getDeviceType();
     11946            size_t cBackRefs = pMedium->i_getMachineBackRefCount();
     11947            Utf8Str strMediumLocation = pMedium->i_getLocationFull();
     11948            strMediumLocation.stripFilename();
     11949            Utf8Str strMachineFolder =  i_getSettingsFileFull();
     11950            strMachineFolder.stripFilename();
    1194311951            if (    (    cleanupMode == CleanupMode_DetachAllReturnHardDisksOnly
    1194411952                      && devType == DeviceType_HardDisk)
     11953                 || (    cleanupMode == CleanupMode_DetachAllReturnHardDisksAndVMRemovable
     11954                      && (    devType == DeviceType_HardDisk
     11955                           || (    cBackRefs <= 1
     11956                                && strMediumLocation == strMachineFolder
     11957                                && *pMedium->i_getFirstMachineBackrefId() == i_getId())))
    1194511958                 || (cleanupMode == CleanupMode_Full)
    1194611959               )
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