VirtualBox

Changeset 39036 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Oct 19, 2011 1:58:52 PM (13 years ago)
Author:
vboxsync
Message:

DevATA: Report actual media type (rather than empty drive) in mode sense header.

File:
1 edited

Legend:

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

    r39010 r39036  
    103103#define ATA_MEDIA_TYPE_DATA                     1    /**< Data CD */
    104104#define ATA_MEDIA_TYPE_CDDA                     2    /**< CD-DA  (audio) CD type */
     105#define ATA_MEDIA_NO_DISC                    0x70    /**< Door closed, no medium */
    105106
    106107/*******************************************************************************
     
    26292630    Assert(s->cbElementaryTransfer <= 16);
    26302631    ataH2BE_U16(&pbBuf[0], 16 + 6);
    2631     pbBuf[2] = 0x70;
     2632    pbBuf[2] = (uint8_t)s->MediaTrackType;
    26322633    pbBuf[3] = 0;
    26332634    pbBuf[4] = 0;
     
    26382639    pbBuf[8] = 0x01;
    26392640    pbBuf[9] = 0x06;
    2640     pbBuf[10] = 0x00;
    2641     pbBuf[11] = 0x05;
     2641    pbBuf[10] = 0x00;   /* Maximum error recovery */
     2642    pbBuf[11] = 0x05;   /* 5 retries */
    26422643    pbBuf[12] = 0x00;
    26432644    pbBuf[13] = 0x00;
     
    26572658    Assert(s->cbElementaryTransfer <= 40);
    26582659    ataH2BE_U16(&pbBuf[0], 38);
    2659     pbBuf[2] = 0x70;
     2660    pbBuf[2] = (uint8_t)s->MediaTrackType;
    26602661    pbBuf[3] = 0;
    26612662    pbBuf[4] = 0;
     
    37163717    pIf->cNotifiedMediaChange = 4;
    37173718    ataMediumRemoved(pIf);
    3718     ataMediumTypeSet(pIf, ATA_MEDIA_TYPE_UNKNOWN);
     3719    ataMediumTypeSet(pIf, ATA_MEDIA_NO_DISC);
    37193720}
    37203721
     
    63056306         */
    63066307        ataMediumInserted(pIf);
     6308        ataMediumTypeSet(pIf, ATA_MEDIA_TYPE_UNKNOWN);
    63076309    }
    63086310    else
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