VirtualBox

Changeset 66046 in vbox for trunk/src/VBox/Main/src-all


Ignore:
Timestamp:
Mar 10, 2017 4:58:36 PM (8 years ago)
Author:
vboxsync
Message:

Main/Snapshot: When creating a snapshot it's necessary to copy the medium attachment objects (and not use the same ones) to separate the new snapshot from current state. Otherwise changing a removable medium (DVD/floppy) will show up in 'fresh' snapshots, i.e. the ones taken since VBoxSVC was started. Same issue for PCI device attachments (which isn't used as much). Apart from that a lot of error checking cleanup, for consistency reasons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/PCIDeviceAttachmentImpl.cpp

    r61009 r66046  
    3030         LONG          aHostAddress,
    3131         LONG          aGuestAddress,
    32          BOOL          afPhysical)
    33         : HostAddress(aHostAddress), GuestAddress(aGuestAddress),
    34           fPhysical(afPhysical)
     32         BOOL          afPhysical) :
     33        DevName(aDevName),
     34        HostAddress(aHostAddress),
     35        GuestAddress(aGuestAddress),
     36        fPhysical(afPhysical)
    3537    {
    36         DevName = aDevName;
    3738    }
    3839
     
    8081
    8182    return S_OK;
     83}
     84
     85HRESULT PCIDeviceAttachment::initCopy(IMachine *aParent, PCIDeviceAttachment *aThat)
     86{
     87    LogFlowThisFunc(("aParent=%p, aThat=%p\n", aParent, aThat));
     88
     89    ComAssertRet(aParent && aThat, E_INVALIDARG);
     90
     91    return init(aParent, aThat->m->DevName, aThat->m->HostAddress, aThat->m->GuestAddress, aThat->m->fPhysical);
    8292}
    8393
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