VirtualBox

Changeset 90209 in vbox


Ignore:
Timestamp:
Jul 15, 2021 10:56:02 AM (4 years ago)
Author:
vboxsync
Message:

DevATA: report proper Media Event Code for ATA_EVENT_STATUS_MEDIA_CHANGED, bugref:10054.

File:
1 edited

Legend:

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

    r90166 r90209  
    110110/* MediaEventStatus */
    111111#define ATA_EVENT_STATUS_UNCHANGED              0    /**< medium event status not changed */
    112 #define ATA_EVENT_STATUS_MEDIA_NEW              1    /**< new medium inserted */
    113 #define ATA_EVENT_STATUS_MEDIA_REMOVED          2    /**< medium removed */
    114 #define ATA_EVENT_STATUS_MEDIA_CHANGED          3    /**< medium was removed + new medium was inserted */
    115 #define ATA_EVENT_STATUS_MEDIA_EJECT_REQUESTED  4    /**< medium eject requested (eject button pressed) */
     112#define ATA_EVENT_STATUS_MEDIA_EJECT_REQUESTED  1    /**< medium eject requested (eject button pressed) */
     113#define ATA_EVENT_STATUS_MEDIA_NEW              2    /**< new medium inserted */
     114#define ATA_EVENT_STATUS_MEDIA_REMOVED          3    /**< medium removed */
     115#define ATA_EVENT_STATUS_MEDIA_CHANGED          4    /**< medium was removed + new medium was inserted */
    116116
    117117/* Media track type */
     
    30323032                pbBuf[2] = 0x04; /* media */
    30333033                pbBuf[3] = 0x5e; /* supported = busy|media|external|power|operational */
    3034                 pbBuf[4] = 0x03; /* media removal */
     3034                pbBuf[4] = OldStatus == ATA_EVENT_STATUS_MEDIA_CHANGED ? 0x04 /* media changed */ : 0x03; /* media removed */
    30353035                pbBuf[5] = 0x00; /* medium absent / door closed */
    30363036                pbBuf[6] = 0x00;
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