VirtualBox

Ignore:
Timestamp:
Dec 11, 2009 1:09:40 PM (15 years ago)
Author:
vboxsync
Message:

Main/Machine+MediumAttachment: fix loading the passthrough setting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MediumAttachmentImpl.cpp

    r25310 r25326  
    102102 * @param aPort       Port number.
    103103 * @param aDevice     Device number on the port.
    104  * @param aImplicit   Wether the attachment contains an implicitly created diff.
     104 * @param aPassthrough Wether accesses are directly passed to the host drive.
    105105 */
    106106HRESULT MediumAttachment::init(Machine *aParent,
     
    110110                               LONG aDevice,
    111111                               DeviceType_T aType,
    112                                bool aImplicit /*= false*/)
    113 {
    114     LogFlowThisFuncEnter();
    115     LogFlowThisFunc(("aParent=%p aMedium=%p aControllerName=%ls aPort=%d aDevice=%d aType=%d aImplicit=%d\n", aParent, aMedium, aControllerName.raw(), aPort, aDevice, aType, aImplicit));
     112                               bool aPassthrough)
     113{
     114    LogFlowThisFuncEnter();
     115    LogFlowThisFunc(("aParent=%p aMedium=%p aControllerName=%ls aPort=%d aDevice=%d aType=%d aPassthrough=%d\n", aParent, aMedium, aControllerName.raw(), aPort, aDevice, aType, aPassthrough));
    116116
    117117    if (aType == DeviceType_HardDisk)
     
    131131    unconst(m->bd->lPort)   = aPort;
    132132    unconst(m->bd->lDevice) = aDevice;
    133     unconst(m->bd->type)   = aType;
    134 
    135     m->bd->fPassthrough = false;
    136     m->bd->fImplicit = aImplicit;
     133    unconst(m->bd->type)    = aType;
     134
     135    m->bd->fPassthrough = aPassthrough;
     136    /* Newly created attachments never have an implicitly created medium
     137     * associated with them. Implicit diff image creation happens later. */
     138    m->bd->fImplicit = false;
    137139
    138140    /* Confirm a successful initialization when it's the case */
     
    146148                          psz ? psz - ctlName.c_str() : 4, ctlName.c_str(),
    147149                          aPort, aDevice, Global::stringifyDeviceType(aType),
    148                           aImplicit ? ":I" : "");
     150                          m->bd->fImplicit ? ":I" : "");
    149151
    150152    LogFlowThisFunc(("LEAVE - %s\n", getLogName()));
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