VirtualBox

Changeset 13985 in vbox


Ignore:
Timestamp:
Nov 9, 2008 2:28:38 PM (16 years ago)
Author:
vboxsync
Message:

Main: Handle SATA controller too when doing snapshots

File:
1 edited

Legend:

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

    r13908 r13985  
    68626862    hrc = hda->COMGETTER(Channel)(&lChannel);                                   H();
    68636863
    6864     int iLUN;
     6864    int         iLUN;
     6865    const char *pcszDevice = NULL;
     6866
    68656867    switch (enmBus)
    68666868    {
     
    68806882
    68816883            iLUN = 2*lChannel + lDev;
     6884            pcszDevice = "piix3ide";
    68826885            break;
    68836886        }
     
    68856888        {
    68866889            iLUN = lChannel;
     6890            pcszDevice = "ahci";
    68876891            break;
    68886892        }
     
    68996903     */
    69006904    PCFGMNODE pCfg;
    6901     PCFGMNODE pLunL1 = CFGMR3GetChildF(CFGMR3GetRoot(pVM), "Devices/piix3ide/0/LUN#%d/AttachedDriver/", iLUN);
     6905    PCFGMNODE pLunL1;
     6906
     6907    pLunL1 = CFGMR3GetChildF(CFGMR3GetRoot(pVM), "Devices/%s/0/LUN#%d/AttachedDriver/", pcszDevice, iLUN);
     6908
    69026909    if (!pLunL1)
    69036910    {
    6904         PCFGMNODE pInst = CFGMR3GetChild(CFGMR3GetRoot(pVM), "Devices/piix3ide/0/");
     6911        PCFGMNODE pInst = CFGMR3GetChildF(CFGMR3GetRoot(pVM), "Devices/%s/0/", pcszDevice);
    69056912        AssertReturn(pInst, VERR_INTERNAL_ERROR);
    69066913
     
    69987005         * Detach the driver and replace the config node.
    69997006         */
    7000         rc = PDMR3DeviceDetach(pVM, "piix3ide", 0, iLUN);                           RC_CHECK();
     7007        rc = PDMR3DeviceDetach(pVM, pcszDevice, 0, iLUN);                            RC_CHECK();
    70017008        CFGMR3RemoveNode(pCfg);
    70027009        rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg);                             RC_CHECK();
     
    70367043     * Attach the new driver.
    70377044     */
    7038     rc = PDMR3DeviceAttach(pVM, "piix3ide", 0, iLUN, NULL);                     RC_CHECK();
     7045    rc = PDMR3DeviceAttach(pVM, pcszDevice, 0, iLUN, NULL);                      RC_CHECK();
    70397046
    70407047    LogFlowFunc (("Returns success\n"));
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