VirtualBox

Changeset 92227 in vbox


Ignore:
Timestamp:
Nov 4, 2021 9:40:52 PM (3 years ago)
Author:
vboxsync
Message:

Storage: On reset mark the medium as unlocked. Solves long standing medium lock misbehavior which can be annoying with VMs running off a DVD (image or host drive).

Location:
trunk/src/VBox/Devices/Storage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DrvHostDVD.cpp

    r91869 r92227  
    4747typedef struct DRVHOSTDVD
    4848{
    49     /** Base drivr data. */
     49    /** Base driver data. */
    5050    DRVHOSTBASE             Core;
    5151    /** The current tracklist of the loaded medium if passthrough is used. */
     
    499499}
    500500
     501/**
     502 * Reset a host dvd drive driver instance.
     503 *
     504 * @copydoc FNPDMDRVRESET
     505 */
     506static DECLCALLBACK(void) drvHostDvdReset(PPDMDRVINS pDrvIns)
     507{
     508    PDRVHOSTDVD pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTDVD);
     509
     510    if (pThis->pTrackList)
     511    {
     512        ATAPIPassthroughTrackListDestroy(pThis->pTrackList);
     513        pThis->pTrackList = NULL;
     514    }
     515
     516    int rc = drvHostBaseDoLockOs(&pThis->Core, false);
     517    RT_NOREF(rc);
     518}
     519
    501520
    502521/**
     
    534553    NULL,
    535554    /* pfnReset */
    536     NULL,
     555    drvHostDvdReset,
    537556    /* pfnSuspend */
    538557    NULL,
  • trunk/src/VBox/Devices/Storage/DrvVD.cpp

    r91955 r92227  
    44794479        pThis->offDisk          = 0;
    44804480    }
     4481    pThis->fLocked = false;
    44814482}
    44824483
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